[comp.windows.x] olwm *exiting* problems

Nagesh_Pabbisetty.Henr801C@xerox.COM (01/30/91)

I have just stated using olwm, and am facing the following problems. I looked
at the Frequenly-Asked-Questions list, but it did not help. Please let me know
the work-arounds for the following problems:

1. When I select the "exit" item in olwm's menu, it kills all the clients on
   the desktop and the X server! Is there any way that I can have "exit" menu
   item to just kill olwm without affecting other clients?

2. I have set OpenWindows.FocusLenience to true. When I do a ps, find the pid
   for olwm and kill it, it takes the window focus along with it!! I cant
   go into any xterm window and type "twm" to start twm...

   I could start olwm with the "f" flag, but is there a way to have olwm behave
   in a more user-friendly manner when it exits?

Thanks, in advance.

Nagesh Pabbisetty (pabbiset@arisia.xerox.com)

smarks@eng.sun.COM (Stuart Marks) (01/30/91)

Nagesh_Pabbisetty.Henr801C@xerox.com writes:

 1. When I select the "exit" item in olwm's menu, it kills all the
    clients on the desktop and the X server!  Is there any way that I can
    have "exit" menu item to just kill olwm without affecting other
    clients?

Yes.  The following line
adds a menu item that does what you want:

	"Exit Window Manager"		    WMEXIT

This causes olwm to exit without killing all the applications on the
desktop.  Add this line to your .openwin-menu customization file.  If you
don't have a .openwin-menu file, you can copy the system default menu file
from somewhere, probably $OPENWINHOME/lib/openwin-menu.

(Why does olwm kill all the clients in the first place?  Well, think of
"exit" as "logout".  Most users login and logout more often than they
switch window managers.  If you need to switch window managers, that's
what the WMEXIT menu command is for.)

 2. I have set OpenWindows.FocusLenience to true.  When I do a ps, find the
    pid for olwm and kill it, it takes the window focus along with it!!  I
    cant go into any xterm window and type "twm" to start twm...  I could
    start olwm with the "f" flag, but is there a way to have olwm behave in
    a more user-friendly manner when it exits?

FocusLenience or "olwm -f" shouldn't have anything to do with this.  What
signal are you using to kill olwm?  If you use an uncatchable signal, like
kill -9 (KILL), olwm cannot clean up after itself.  As you've noticed,
the focus gets left in an unusable state.  If you kill olwm with one of
the signals it catches (HUP, INT, TERM), it will leave things in a
reasonable state.

s'marks

Stuart W. Marks			ARPA: smarks@eng.sun.com
Windows & Graphics Software	UUCP: sun!smarks
Sun Microsystems, Inc.

Nagesh_Pabbisetty.Henr801C@xerox.COM (01/31/91)

> Yes.  The following line
> adds a menu item that does what you want:

>	"Exit Window Manager"		    WMEXIT

	I copied $OPENWINHOME/lib/openwin-menu to my home dir as .openwin-menu.
	I edited it to have the following 2 lines:

		"Exit WM..."			WMEXIT

		"Exit..."			EXIT

	Here is what happens:

	1. When I run openwin, then olwm menu has both these entries. However,
	   using  "Exit WM..." logs me out of the system even without asking
	   me for confirmation. When I select "Exit..." menu item, it asks me
	   for confirmation. However, both exit me from the server!
	   Is there anything I am doing incorrectly?

	2. If I run the MIT server, and then start up olwm, its menu does not
	   show an entry for "Exit WM..." at all! Should I have another default
	   file for using olwm with the MIT server? MIT server with olwm is
	   my preferred configuration (:-).

> (Why does olwm kill all the clients in the first place?  Well, think of
> "exit" as "logout".  Most users login and logout more often than they
> switch window managers.  If you need to switch window managers, that's
> what the WMEXIT menu command is for.)

	Makes sense.

Thanks to smarks@eng.sun.com, raja@cps.msu.edu, welch@scam.berkeley.edu, and
steve@umiacs.umd.edu for answering my questions...

Any info to solve my problem will be appreciated.

Regards,

nagesh (pabbiset@arisia.xerox.com)

smarks@eng.sun.COM (Stuart Marks) (01/31/91)

Nagesh_Pabbisetty.Henr801C@xerox.com writes:

    	1. When I run openwin, then olwm menu has both these entries. However,
    	   using  "Exit WM..." logs me out of the system even without asking
    	   me for confirmation. When I select "Exit..." menu item, it asks me
    	   for confirmation. However, both exit me from the server!
    	   Is there anything I am doing incorrectly?

More details... it's not olwm that shuts down the server, it's another
agent.  In the case of OpenWindows, this agent is xinit.  When you start
up the system, xinit runs a the .xinitrc script and waits for it to
finish.  When .xinitrc finishes, xinit shuts down the server.  The default
.xinitrc waits for olwm to exit.  So, when olwm exits, .xinitrc exits, and
then xinit kills the server.

To change this behavior, edit .xinitrc so that it waits for something
other than olwm.  For example, the last lines of my .xinitrc are

	olwm &
	exec xterm -C -g 80x8-0+0

which run olwm and then a console xterm.  This way, the server stays up
until I exit the console xterm.
    
    	2. If I run the MIT server, and then start up olwm, its menu does not
    	   show an entry for "Exit WM..." at all! Should I have another default
    	   file for using olwm with the MIT server? MIT server with olwm is
    	   my preferred configuration (:-).

This is odd.  Do you have a different version of olwm in your MIT
installation?  Older versions of olwm read a different menu customization
file.  Make sure you have the latest version of olwm.  The olwm in
OpenWindows version 2 and the olwm in the XView source release (on expo in
contrib/xview2.tar.Z) are virtually identical and are the latest publically
available versions.  You should be able to run the the olwm from
OpenWindows with the MIT server.

s'marks

Stuart W. Marks			ARPA: smarks@eng.sun.com
Windows & Graphics Software	UUCP: sun!smarks
Sun Microsystems, Inc.

tro@adiron.uucp (Tom Olin) (02/01/91)

In article <9101292154.AA15362@trantor.Eng.Sun.COM> smarks@eng.sun.COM (Stuart Marks) writes:

	   "Exit Window Manager"		    WMEXIT

   This causes olwm to exit without killing all the applications on the
   desktop.

You must also be sure that xinit isn't waiting to kill the server as soon as
olwm exits.  Make sure that xinit waits on some other client - say, an xterm.
--
	Tom Olin	uunet!adiron!tro	(315) 738-0600 Ext 638
 PAR Technology Corporation * 220 Seneca Turnpike * New Hartford NY 13413-1191