Guide to X11/Starting Programs
From Wikibooks, the open-content textbooks collection
[edit] Starting Programs
The traditional Unix method of starting a program is call it from the shell by entering its name on the command line. For example:
$ emacs
At the beginning of the X Window System, the method to start an X11 client was essentially the same.. You would always have an XTerm open, so you could enter commands to open Emacs, Netscape, and other XTerms. Of course, this meant that if you closed (or xkilled) an XTerm, you would "hang up" all programs started from it, thus causing them to quit and disappear suddenly. So you had to remember to leave open the XTerm from which you started the clients.
Some window managers added a feature called the minicli, for MINIature Command LIne. You choose "Run Command" from some menu, then type the name of a program, such as "emacs". This solved the problem of having extra XTerms (or Konsoles, et cetera) open just to start some programs. However, it introduced another problem: some programs print error messages to the terminal, and you might need to retrieve the error message if you wonder why your program is crashing or not starting. The solution is to log to some file, such as ~/.xsession-errors, when starting your session.
Many window managers also allow to start programs from menus. However different window managers have different methods of configuration. There are some attempts at a solution such that you can use the same menu in different window managers. GNOME and KDE currently use a common *.desktop file format to indicate a menu item.
KDE typically provides a K menu in the lower left corner of the screen. GNOME typically provides menus like "Applications" in the upper left corner. Both environments can be customised. Some window managers let you somehow click the desktop background to summon the menu.