"Exit" from mwm

Michael G. Beirne mikebe at austin.itx.isc.com
Tue Mar 26 10:41:14 AEST 1991


In article <KQPFH0S at linac.fnal.gov> looi at 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 at 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 at i88.isc.com



More information about the Comp.unix.aix mailing list