Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!ispd-newsserver!ism.isc.com!ism.isc.com!mikebe From: mikebe@austin.itx.isc.com (Michael G. Beirne) Newsgroups: comp.unix.aix Subject: Re: "Exit" from mwm Message-ID: Date: 26 Mar 91 00:41:14 GMT References: Sender: usenet@ism.isc.com (Ism Usenet News) Organization: /user/mikebe/.organization Lines: 56 In-Reply-To: looi@sutro.SFSU.EDU's message of 25 Mar 91 04:33:11 GMT In article looi@sutro.SFSU.EDU (W. W. Looi) writes: > Path: ism.isc.com!ispd-newsserver!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!daemon > From: looi@sutro.SFSU.EDU (W. W. Looi) > Newsgroups: comp.unix.aix > Date: 25 Mar 91 04:33:11 GMT > Organization: San Francisco State University > I'm new to AIX environment. I wonder if there is a way to "elegantly" > exit from mwm and return to either login or console screen without > resorting to CTRL-ALT-Backspace? I was told that "xstop" will do the > job, but I don't seem to be able to locate it. Worst yet, it's not > documented anywhere in the manual. *sigh* Copy /usr/lib/X11/system.mwmrc to your home directory and rename it .mwmrc. Then add the "Stop X" line to the Root menu and the menu StopX. -------------------------------------------------------------- # Root Menu Description Menu RootMenu { "Root Menu" f.title ....(missing lines) "Restart..." f.restart "Stop MWM" f.quit_mwm "Stop X" f.menu StopX } Menu StopX { "Stop the X Server?" f.title "No, don't kill the X Server" f.beep "Yes, I want to stop X and kill all X clients!" f.exec "kill $XSERVERPID" } ------------------------------------------------------------------------- Then in $HOME/.xinitrc add the following line: XSERVERPID=`ps -ef|grep '/X '|grep rgb |awk '{print $2}';export XSERVERPID This makes several assumptions: a) The X servers name is "X" b) It has the argument "rgb" to it. (you are on a color system) "grep '/X ' matches itself from the ps. The second grep deletes this and then there is only one line passed to awk c) There is only one X server running on the system. This works for me on a RS6000 part number 7013(model 530). It will slow up your X startup a bit. Another way might be to startup X with the command: open xinit Then when you type ALT+Ctrl/Act the console window will become active again and you can kill off X from this window. I haven't tested this yet, but it should work. Michael G. Beirne mikebe@i88.isc.com