This page last updated 1998-02-05. This paragraph added 1999-02-26.

CLI/GUI crossbreed for Linux

I think the strengths of a CLI -- easy scriptability, command history, a sense of context, and ease in doing more-complex tasks -- can be combined with the strengths of a GUI -- quick visual comprehension, convenience of access, easy access to documentation, and insusceptibility to errors.

Proposed solution

The first part of my solution is to have a GUI that drives a CLI. Buttons that invoke commands, drag-and-drop that assembles commands. Most GUIs work this way under the hood these days anyway; there's a scripting-language command run by each GUI event. Exposing this complexity to the user would be a good idea.

The second part of my solution is to make the CLI's output more GUIish.

Proposed Implementation

I propose to add some escape sequences to rxvt.

One escape sequence will be used to include icons into CLI output -- and possibly more than just icons. It will include segments for an XPM filename, a width, a height, and an alignment. This escape sequence will be used to bring icons to output from ls and ps, for example.

Another escape sequence will be used to mark text with attributes. (Another, shorter one will mark the end of the marked text.) One attribute will be a text string to be pasted if the text is clicked on, and dragged if a drag-and-drop action is started from within the text. Another attribute could be a filename to be used as a help file, which could be extremely useful for text like `drwxr-xr-x'!

(Perhaps help files should be done a different way, such as by having a uniform set of string-pattern-to-helpfile matchings.)

Yet other text regions will be marked as drop-targets, which will paste a text string -- usually ending with \n -- with a placeholder for the text dragged onto them. For example, a trashcan icon could have the text `rm -i #\n' in it. Dragging a file /u/kragen/useless-idea from a directory listing onto the trashcan icon would paste the command `rm -i /u/kragen/useless-idea\n' into the terminal window. (Presumably the GUI-aware rm prompt would include places to click for `y\n' and `n\n'.) Simply clicking on these text regions would paste the part up to the placeholder.

Another important accessory would be a fairly static palette of commands and filenames, things like `rm -i #\n', `ls #\n', `#\n' and `locate #\n'. These would help to orient the new user and make available the crucial commands. Preferably, the user would be able to drag filenames and such there, too.

By this means, Linux newbies would never lose their place, would always have concise, quickly-available help for when they needed it, and would not lose sight of the things happening beneath the hood -- which means they'd be able to shell-script when the time came, locking them forever into Linux.

Areas of effort

To implement what I have described, we would need to: