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
To quit the window manager, select the Exit
the root menu.
Here are the steps to shut down X:
Quit all noncontrolling programs (all programs other
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
use the editor's "quit" command, then finish the xterm
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
can interrupt and kill a program before it's ready.
If, however, a program doesn't have its own "quit" command, use Close
on the window menu.
If any icons are running programs that have their own "quit" command,
open the icons into windows and use the "quit" commands.
Quit the controlling program.
After X shuts down, you may get a UNIX shell prompt.
If you do, you can log out by entering exit
If you simply get another login box from xdm
(as in Figure 2.2
), you're done.