Life Hacks


Comparison Between CUI And GUI

Graphical user interface

A graphical user interface is a type of user interface which allows people to interact with electronic devices such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment with images rather than text commands. A GUI offers graphical icons, and visual indicators, as opposed to text-based interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. The actions are usually performed through direct manipulation of the graphical elements.



Following PARC the first GUI-centric computer operating model was the Xerox 8010 Star Information System in 1981 followed by the Apple Lisa (which presented concept of menu bar as well as window controls), in 1982 and the Atari ST and Commodore Amiga in 1985.

The GUIs familiar to most people today are Microsoft Windows, Mac OS X, and the X Window System interfaces. Apple, IBM and Microsoft used many of Xerox’s ideas to develop products, and IBMs Common User Access specifications formed the basis of the user interface found in Microsoft Windows, IBM OS/2 Presentation Manager, and the Unix Motif toolkit and window manager. These ideas evolved to create the interface found in current versions of Microsoft Windows, as well as in Mac OS X and various desktop environments for Unix-like operating systems, such as Linux. Thus most current GUIs have largely common idioms.


A GUI uses a combination of technologies and devices to provide a platform the user can interact with, for the tasks of gathering and producing information. The most common combination in GUIs is the WIMP paradigm, especially in personal computers.

This style of interaction uses a physical input device to control the position of a cursor and presents information organized in windows and represented with icons. Available commands are compiled together in menus and actioned through the pointing device. A window manager facilitates the interactions between windows, applications, and the windowing system. The windowing system handles hardware devices such as pointing devices and graphics hardware, as well as the positioning of the cursor.

In personal computers all these elements are modeled through a desktop metaphor, to produce a simulation called a desktop environment in which the display represents a desktop, upon which documents and folders of documents can be placed. Window managers and other software combine to simulate the desktop environment with varying degrees of realism.

User interface and interaction design

Designing the visual composition and temporal behavior of GUI is an important part of software application programming. Its goal is to enhance the efficiency and ease of use for the underlying logical design of a stored program, a design discipline known as usability. Techniques of user-centered design are used to ensure that the visual language introduced in the design is well tailored to the tasks it must perform.

Typically, the user interacts with information by manipulating visual widgets that allow for interactions appropriate to the kind of data they hold. The widgets of a well-designed interface are selected to support the actions necessary to achieve the goals of the user. A Model-view-controller allows for a flexible structure in which the interface is independent from and indirectly linked to application functionality, so the GUI can be easily customized. This allows the user to select or design a different skin at will, and eases the designer’s work to change the interface as the user needs evolve. Nevertheless, good user interface design relates to the user, not the system architecture.

The visible graphical interface features of an application are sometimes referred to as “chrome”. Larger widgets, such as windows, usually provide a frame or container for the main presentation content such as a web page, email message or drawing. Smaller ones usually act as a user-input tool.

A GUI may be designed for the rigorous requirements of a vertical market. This is known as an “application specific graphical user interface.” Examples of an application specific GUI are:

· Touch screen point of sale software used by wait staff in a busy restaurant

· Self-service checkouts used in a retail store

· Automated teller machines (ATM)

· Airline self-ticketing and check-in

· Information kiosks in a public space, like a train station or a museum

· Monitors or control screens in an embedded industrial application which employ a real time operating system (RTOS).

The latest cell phones and handheld game systems also employ application specific touch screen GUIs. Newer automobiles use GUIs in their navigation systems and touch screen multimedia centers.

Common user Interface

What is a CUI?

CUI (Composite User Interface) is a compound type of user interface, which incorporates the features of the GUI (Graphical User Interface) and the CLI (Command Line Interface) by realizing both interfaces in one area at the same time. It is absolutely substantial that the CUI contains GUI elements and control language in the same area of the screen at the same time, so the incorporation is complete. CUI is not an optional, alternatively selectable combination of the two communication method but a truly new approach.

An other relevant feature of the CUI method is that it uses generated commands. When the user activated some GUI part of the user interface an automatically generated command appears to complete the task so the user can observ how the CLI part of the user interface can be used.

The Cuiterm

The cuiterm is a pilot application for the CUI methodology made to demonstrate the power of the composite user interfaces. As terminals are usually used with some shell to start simple UNIX utility programs, the Cui library can be considered as a composite user interface for the shell and some UNIX utilities. The following screenshot shows the starting screen of the cuiterm.


How to use it?

To test the composite user interface first you have to download the cuiterm and and install it. After the installation is complete the program can be started with the cuiterm command.

When the terminal emulator started it can be used the usual way by typing commands into it. Some programs and some complex commands are interpreted by the terminal and colorized (see the list below). For these commands the screen should have active areas usable with the left mouse button by double clicking on them. The output of some programs have floating menus with context sensitive functions. The menus can be accessed by the right mouse button. Some parts of the screen can be used to fire up a text entry field by holding down the left mouse button.

The following list contains some interpreted and processed commands that are worth trying.

A common user interface (CuI) is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options.


This method of instructing a computer to perform a given task is referred to as “entering” a command: the system waits for the user to conclude the submitting of the text command by pressing the “Enter” key (a descendant of the “carriage return” key of a typewriter keyboard). A common user interpreter then receives, analyses, and executes the requested command. The common user interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as PuTTY. Upon completion, the command usually returns output to the user in the form of text lines on the CLI. This output may be an answer if the command was a question, or otherwise a summary of the operation.


A CUI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with operating system command shells. Also, some computer languages (such as Python, Forth, LISP and many dialects of BASIC) provide an interactive command line mode to allow for experimentation.

CUIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CUIs are also popular among people with visual disability, since the commands and feedbacks can be displayed using Refreshable Braille displays.

In November 2006, Microsoft released version 1.0 of Windows Power Shell (formerly codenamed Monad), which combined features of traditional Unix shells with their object-oriented .NET Framework. MinGW and Cygwin are open source packages for Windows that offer a Unix like CUI. Microsoft provides MKS Inc.’s ksh implementation MKS Korn shell for Windows through their Services for UNIX add-on.

Command prompt

A command prompt (or just prompt) is a sequence of (one or more) characters used in a common-user interface to indicate readiness to accept commands. Its intent is to literally prompt the user to take action. A prompt usually ends with one of the characters $, %, #, :, > and often includes other information, such as the path of the current working directory.

It is common for prompts to be modifiable by the user. Depending on the environment, they may include colors, special characters, and other elements like the current time, in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands.

In DOS’s COMMAND.COM and in the Windows command-line interpreter cmd.exe the prompt is modifiable by issuing a prompt command or by changing the value of the %PROMPT% environment variable. The default of most modern systems, the C:\> style is obtained, for instance, with “prompt $P$G”. The default of older DOS systems, C> is obtained by just “prompt”, although on some systems this produces the newer C:\> style; on those systems “prompt $N$G” can be used to switch to the older style.

On many Unix systems, the $PS1 variable can be used, although other variables also may have an impact on the prompt (depending on what shell is being used). In the bash shell, a prompt of the form

[time] user@host: work_dir $

could be set by issuing the command

export PS1='[\t] \u@\H: \W $’

In zsh the $RPROMPT variable controls an optional “prompt” on the right hand side of the display. It is not a real prompt in that the location of text entry does not change. It is used to display information on the same line as the prompt, but right justified.

In RISC OS, the command prompt is a ‘*’ symbol, and thus (OS)CLI commands are often referred to as “star commands”. It is also possible to access the same commands from other command lines (such as the BBC BASIC command line), by preceding the command with a ‘*’.

GUI vs. CUI: A Qualitative Comparison

Benefits of the CUI:

– The structure of Unix and of its shells allows powerful mechanisms of piping and redirection to work. Anyone who has even done administration tasks in this environment, even simply on a desktop machine, knows that things like sed and sort are a necessity. What makes this unique is that it is universal–there is no command whose output cannot be redirected somewhere else, whether to a file or to another command. It is conceivable for a programmer to, say, add an “Edit this output in Notepad” option to a number crunching program. But to make an entire graphical userspace have universal interfaces for redirecting output is truly a titanic task (KDE and Kparts have made good progress, but as we all know, the free Unix GUI is badly fragmented, making universality practically impossible). A good part of the difficulty of doing this comes from the heterogenity of the data being operated upon, as well as the inherent multifunctionality of graphical interfaces–although cut and paste is a good thing too.

– The world of the Unix console, as opposed to its desktop, is rather unfragmented. POSIX, that mighty juggernaut of standardization, has ensured that porting command-line programs from one Unix to another is a relative breeze. Especially remarkable is the fact that it can also function for wholly un-Unix systems–like the BeOS (to which I believe the E.i.C. of this site has ported a number of programs) or QNX, or even Windows, all of which have rather complete suites of GNU programs (in the latter case, two). Porting a program that uses graphics, however, is sometimes difficult even among Unices–especially given the varying degrees of freeness of graphical Unix programs and libraries (Unix’s command line has largely abandoned that conflict, since the source for the vast majority (all?) of its core programs is available through BSD).

– Although today’s hardware largely renders this point moot, command-line programs incur much less size and speed overhead than their graphical counterparts. In fact, bash itself, at 600-odd kilobytes, is likely to be one of the largest command line programs one runs. By “overhead” I mean exactly that–the amount of resources consumed that is not strictly necessary to the task at hand. So, for instance, it stands to reason that GCC will soak up more memory and CPU than KMenuEd, but that is inherent in its function. Also, when one recycles old hardware for routers and minor servers, it would be a waste to put a graphical desktop on it. This is one of the main reasons that Linux (*BSD too) is popular for reincarnating 486s–it can be easily administered via command line.

– Remote access is a necessary element of such administration. There is, of course, VNC and PCAnywhere and what-have-you, but of those, only VNC is as cross-platform and simple as SSH. An SSH session essentially can start from anywhere, since there are clients available for a huge number of platforms. Also, the OpenSSH folks are serious about security: encryption allows one not to worry about passwords. VNC, though, unless tunnelled through SSH, offers no security at all. Textual information is also much smaller than graphical, obviously making remote connections less of a pain in the neck. It is extremely difficult to get a tolerable speed with VNC, whereas with SSH the speed is near local. The last element is antiquated, but nevertheless powerful–serial consoles. There simpty is no better tool to administer a temporarily offline headless server.

These are some of the virtues of the command line. There are other things specific to shells that make life much easier, but these are the important ones.

Benefits of the GUI:

– An important benefit is the display of dynamically modifiable abstract information (Short example: Open a file manager and delete a file, then make sure it is deleted: three shell commands vs. a mouse click.). This means web browsing, spreadsheets, word processors, etc. are possible. This is available for the console with Curses and Turbopower and that sort of thing, but I do not think that these libraries belong to the CUI proper.

– Of course, aesthetics. It is much more pleasant looking at Luna than at a serial console (I think the Luna widgets are the coolest thing since GEM, but that’s just me), and I think a good reason for the migration to GUI is the prettier and more natural feel. It is no accident that Unix started recovering from its slump when high-quality desktop environments (Gnome, KDE, NOT CDE) became available–because of Linux.

– Modern computing is very much focused on media, and that is naturally only done with graphical environments. Framebuffers are inadequate for this kind of function.

– The graphical desktop allows true multitasking (for the user) to take place. Switching virtual terminals is a poor replacement for switching windows, because windows allow more than one program to show its output at the same time, resulting in much increased efficiency and flexibility.

I think I have made a case for the continued existence of the command-line interface. I hope there will be a place for the little blinking cursor (in a window, all right) in whatever fancy new desktop wins the wars.

Comparison Of CUI AND GUI In Tabular Form


Leave a Reply