"Exit" from mwm
Jeff W. Boote
boote at bierstadt.scd.ucar.edu
Wed Mar 27 07:34:32 AEST 1991
> So, does anyone know of a way to get out of X-windows *without* using
> CTRL-ALT-BACKSPACE ? (i.e. a way that can be setup as a menu item...
> I KNOW you can do it with OTHER window managers (TWM)...
This has nothing to do with the window manager! The window manager is
just an X-client like any other with a few extra permissions. The answer
to the original poster is two-fold. First, you must disable the ability
to kill X using CTRL-ALT-BS. This is done using the -T option to xinit
when you start up X.
ie. /usr/bin/X11/xinit -T
The second part of the problem is to kill X when you exit. There are
many ways you can do this. The first thing you need to decide is when
is it reasonable to quit X, when the window manager exits? when some
other window exits? On most systems the user is given a window that
is called the console or login window. On these systems X is killed
when the user log's off of that window. That is the methode I have
used. To do this on AIX 3.1 you must copy the file
/usr/lpp/X11/defaults/xinitrc
into your home directory as .xinitrc
This script will be executed from the xinit command. This is the same
place you would add in any clients you want automatically started every
time you start X. The default script starts up an aixterm, xclock and
the adobe postscrit copywrite. You can change these to any clients you
want. The key to getting X to exit is how you call xinit and how you
enter the clients in this file. The easiest way to get X to automatically
exit is by using the "open" command to execute xinit.
ie. open /usr/bin/X11/xinit -T
What this will do is to open a virtual terminal that will stay open until
the xinitrc script finishes executing. Therefore since the last line
of the default xinitrc file is "exec mwm" that virtual terminal will remain
open untill mwm exits. What I have done so that I can start up different
window managers without killing X is to replace that line with
mwm&
and then I start up an xterm in its place.
exec xterm -n Console -T Console
Therefore when I logout of that window all of X is killed.
Hope this helps,
jeff
--
Jeff W. Boote <boote at ncar.ucar.edu> *********************************
Scientific Computing Division * There is nothing good or bad *
National Center for Atmospheric Reasearch * but thinking makes it so. *
Boulder * Hamlet *
*********************************
More information about the Comp.unix.aix
mailing list