The default root menu for mwm, for example, includes
an option to exit, which must be selected to exit the X server. If you??™re building a
kiosk, you can use a more robust solution (Section 15.10).
You can modify the script above to work as an ~/.xinitrc script, for use with startx
(Section 2.9), if you remove the X server startup:
#!/bin/sh
# Start an X server with specific clients
8.7
132 Chapter 8: Session Managers, Desktop Environments, and Window Managers
# === CONFIGURATION VARIABLES
# Window manager binary name (twm, mwm, etc).
WM=mwm
# Clients to be started, space-separated
CLIENTS="/usr/bin/evolution /usr/local/bin/firefox"
# === END OF CONFIGURATION VARIABLES
# Start clients
for NAME in $CLIENTS
do
$NAME&
done
# Start window manager - server will be terminated
# when the window manager exits
$WM
Since xinit/startx will shut down the X server when the ~/.xinitrc script terminates,
the last client??”in this case, the window manager??”should be run in the foreground
(that is, without an ampersand), preventing the script from ending until you exit
from the window manager.
You can test this .xinitrc using Xnest through startx (using display :8 in this
example):
$ startx -- /usr/bin/Xnest -ac :8
To start those clients on a regular X server, leave out the server binary:
$ startx -- :8
Part III
III.
Pages:
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222