Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!nsc!taux01!pilat!amir From: amir@taux01.nsc.com (Amir J. Katz (Xpert)) Newsgroups: comp.windows.x Subject: Killing X Softly? Keywords: xdm,xinit Message-ID: Date: 29 Apr 91 07:15:40 GMT Sender: amir@pilat.Silvaco.Com Distribution: comp Organization: Silvaco Israel Ltd. Lines: 38 - I start X11R4 on my Sun SparcStation IPC (w/SunOS 4.1.1) with xinit. - My .xinitrc is a Bourne shell script. It opens various xterm windows, fires up the window manager, then waits until the first xterm window dies (typing 'exit' in that xterm is enough). When this happens, the script kills some stubborn X clients and then exits. Below are the relevant parts: xterm -C -ut -geom 102x7+8+80 -fn 8x13bold & loginscreen=$! xterm -ut -geom 113x44+5-5 -bg LightBlue -fg black & xperfmon user system disk -u 5 -fw -fn 6x10 \=300x100+846+5 & xper_pid=$! twm & twm_pid=$! ... wait $loginscreen; kill -9 $twm_pid $xper_pid - Trouble is, when X dies in this manner, I get all kind of ugly messages like "XIO error", "Fatal X error", etc. which trash the console window. Nothing bad really happens, but being a methodical guy, I hate this method. - I've noticed that under OSF/Motif's mwm, the 'close' menu item kills a client nicely, versus twm's function f.kill which results in similarly ugly messages. - The $64,000 question is: is there a nicer way to exit from X? Or alternatively, fire it up in a different manner? - I have used xdm, but I'm afraid it'll monopolize the display and I won't be able to start SunView or OpenLook. - I apologize in advance if this is a FAQ. Please e-mail to me, using the address below. I'll summarize and post. -- Amir J. Katz, System Manager Internet: amir%pilat.UUCP@taux01.nsc.com OR amir@taux01.nsc.com UUCP: {decwrl,uunet,...}!nsc!taux01!amir Phone: +972 52-570713 Fax: +972 52-570719 Snail-mail: Amir J. Katz, Silvaco Israel Ltd. 19 Maskit St., Herzelia, Israel 46733