Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!VAXA.ISI.EDU!raveling From: raveling@VAXA.ISI.EDU (Paul Raveling) Newsgroups: comp.windows.x Subject: Re: Killing applications Message-ID: <8708191643.AA02133@> Date: Wed, 19-Aug-87 12:43:24 EDT Article-I.D.: .8708191643.AA02133 Posted: Wed Aug 19 12:43:24 1987 Date-Received: Sat, 22-Aug-87 02:04:46 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 36 Regarding... I would also like a Root-menu item to Exit X-windows (currently, I type exit to the initial xterm window). After groping around a bit, I arrived at one workable way to do this. on HP 9000's. It seems reasonable it should also work on a Sun, but I make no claims and have little faith in different Un*x systems being REALLY compatible. This technique works when xinit starts X with an initial terminal window. In .uwmrc, each menu has an "Exit from X" entry, looking like this: menu = "Display Operations" (Yellow:Blue:White:Red) { ... other menu entries ... Exit from X: !"exitx" } The exitx shell script contains: # # exitx: Shell file to exit from X # ps -e | awk '/console/&&/xterm/{print "kill " $1}' | csh The main difficulty I had was in trying to specify the shell script's one-liner directly as the menu operand. I never found a successful combination of quotes and escapes to get the correct command delivered to a shell. -- Paul Raveling Raveling@vaxa.isi.edu