Quitting

Like almost everything in X, the way to quit X is configurable. The key to shutting down X is to know which of your programs (your windows or window manager) is the controlling program. When the controlling program quits, any leftover X programs are killed immediately. The controlling program is usually either the window manager or the single xterm window that started your X session.

Find the controlling program for your X session and write it down:

_____________________________ Program to quit last

If your controlling program is an xterm window, we suggest leaving that window iconified from just after you’ve logged in until you’ve shut down all the other X clients. That way, you won’t end your X session accidentally by closing that xterm window too soon.

To quit the window manager, select the Exit or Quit command on the root menu.

Here are the steps to shut down X:

  1. Quit all noncontrolling programs (all programs other than the controlling program). If any windows are running programs that have their own “quit” commands, it’s a good idea to use those special commands to quit. For example, if you’re running a text editor in an xterm window, use the editor’s “quit” command, then finish the xterm window by entering exit at the shell prompt.

    Using the program’s own “quit” command gives the program time to clean up and shut down gracefully. On the other hand, the Close item on the mwm window menu can interrupt and kill a program before it’s ready. If, however, a program doesn’t ...

Get Learning the UNIX Operating System, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.