Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!bierstat.scd.ucar.edu!boote From: boote@bierstadt.scd.ucar.edu (Jeff W. Boote) Newsgroups: comp.unix.aix Subject: Re: "Exit" from mwm Message-ID: <10776@ncar.ucar.edu> Date: 26 Mar 91 21:34:32 GMT References: <1991Mar26.134746.2573@news.larc.nasa.gov> Sender: news@ncar.ucar.edu Reply-To: boote@bierstadt.scd.ucar.edu (Jeff W. Boote) Organization: Scientific Computing Division / NCAR, Boulder Co. Lines: 46 > 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 ********************************* Scientific Computing Division * There is nothing good or bad * National Center for Atmospheric Reasearch * but thinking makes it so. * Boulder * Hamlet * *********************************