home page
   
Manual page for Welcome(to)

Welcome to getgui 2.0



What is getgui?

getgui is a standalone x11 utility that is used for easily adding a degree of graphical user interface functionality to shell scripts or other programs. getgui can display informational messages and in-progress messages, or it can be used to get user input via dialog boxes, keyboard input fields, pulldown menus or select boxes. "Wizard"-type procedural interfaces can be implemented using a series of getgui invocations.

Each invocation of getgui produces one GUI box, and can return one user response. User response is written to stdout (or in some cases user response can be conveyed via getgui's exit code). In its simplest form it is used like this:

getgui "Welcome to getgui 2.0"

When invoked getgui automatically creates a layout of text and controls based on what is specified in the command line arguments, crops the graphic appropriately, and displays the GUI box centered on the X11 screen (by default), thus no position coordinates need to be specified. getgui pays attention to mouse button presses and keyboard key presses. There is no scrolling capability anywhere, except horizontal scrolling of key entry fields. getgui is small and lightweight, implemented using xlib with no other dependencies.

What is it useful for?

The getgui illustrated examples page shows some possibilities. Here's what I've already used getgui for:

  • creating user-friendly shellscript-based GUI program launchers that can be deployed from a gnome / KDE / CDE menu bar. For example, I have a menu bar button to put my laptop to "sleep". When a user clicks on it, a getgui box appears asking "Are you sure?", then on an affirmative response invokes apm --suspend

  • creating shellscript-based wizard-type procedural interfaces. Wizard examples.

  • providing GUI spash screens for slow-to-deploy applications (such as the version of kppp that I have) so that users know that the program is in progress.

  • included in the distribution is alarmclock, an interactive alarm clock utility that uses getgui. Set the time you want the alarm to go off, and a message. When the time comes a getgui box pops up on your screen with the reminder. (versions 2.02+)

  • creating shellscript-based GUI interfaces for local workflow-type operations such as image routing and processing.

  • adding an easy way for users to select a file for an application

  • getgui can be invoked from within C programs as a separate process using popen() and fgets(). For an example of this see lxlogo.

    getgui allows you to cobble together cohesive applications from a collection of utilities. For example, I've used it as part of lxlogo, an interactive LOGO graphical programming environment for K-12 educational use. I've also used it as part of a homegrown system for copying and manipulating photo images from a USB camera, with the jpgtn reducing utility, and the xv image editor.



    Making it simple

    getgui can be downloaded in ready-to-run binary form, or it can be easily built from source code, with no dependencies other than xlib. The getgui interface is non-complex.. developers with some shell script experience should be able to produce attractive useful results in minutes. Control layout is dynamic and automatic, eliminating the need for the developer to code position coordinates, etc.

    Making it easy to see, read, and use

    Many GUI environments tend to use default fonts that are on the small and delicate side, with tiny control features. Many individuals, especially beginners, find it tedious to view small fonts and move the mouse with enough precision to use the controls effectively. A design goal with getgui has been to make the text easy to read, and the controls easy to click on. This seems especially important in repetitive workflow operations.

    Environments

    getgui can be invoked from shell scripts, or from just about any program language that allows a shell command to be executed and the standard output result captured. From a C program use popen() and fgets() (for an example see lxlogo; performance is acceptable). getgui is small, lightweight, and reasonably fast; executable size is ~100 kB. System requirements: any linux/unix system with X11; no other libraries required.

    Version 2.0

    Version 2.00 is a complete re-write, with numerous new features and improvements. See the what's new page for more info. There have been changes to the command line option names and syntax, most notably in 2.0 individual button labels are separated by bars (|), previously they had been separated by commas. A couple major features of 1.3 have been dropped: the -editbox multi-line text entry control, which was buggy anyway, and the alarm clock feature, which may be released later as a separate utility.

    What getgui doesn't do

    getgui has nothing to do with the internet or web!.. it's strictly for use on your local linux or unix box, producing X11 graphics on your screen.

    Select boxes don't have scrolling capability, which is a limitation when the number of choices/files/whatever gets to be very large.

    getgui only uses mouse button presses (not releases) and keyboard key presses; many of the finer points of modern user interface design such as drag/drop, are not supported.

    Copy / paste is not supported. Mouse drag highlighting (for text deletion) in the -keyin field is not supported.

    The getgui(1) utility doesn't allow for more than one control (plus a set of buttons) per GUI box. This allows things to be specified via a reasonably simple command line interface and simplifies handling of results.. "forms" applications are usually best handled by web-based systems anyway.

    Previously a getgui C language API was included. This is no longer available, but you can use getgui from programs by invoking via the shell. For an example of this see lxlogo.

    See also

    xmessage(1)   an early X11 utility still present in some releases that presents user with text and buttons. getgui is an xmessage alternative, an alternative to xmessage. getgui is an xmessage replacement, a replacement for xmessage.

    getgui home page is http://getgui.sf.net


  • Copyright statement


    Markup created by unroff 1.0,    March 12, 2009.