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.

  • 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 allows you to cobble together cohesive applications from a collection of utilities. For example, I plan to use it to drive a LOGO graphical programming environment, using a stock text editor such as pico for entering the code. I also am thinking about setting up a system for copying and manipulating photo images from a USB camera, incorporating a jpeg reducing utility, and an image editor such as xv.

    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 popen() would be the way to go. Since getgui requires one invocation per GUI box, it is certainly less efficient than applications with a compiled-in GUI interface, but performance seems acceptable to me on the various systems I've tried it on. getgui is small, lightweight, and reasonably fast; executable size is ~100 kB.

    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

    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'n'drop, and launching on mouse button release are not possible. 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 capturing multiple results into several shell variables is more complicated.. plus it's not clear that there's a big need for this anyway, since "forms" applications are usually handled by HTML/CGI forms. The underlying API can handle multiple controls however.

    Author

    Steve Grubb     2004.     getgui home page is http://getgui.sf.net

    Send bug reports and correspondence to scg (at) jax (dot) org.


  • Copyright Steve Grubb





    Markup created by unroff 1.0,    October 20, 2004.