[openbox] Conservative exit?

Anthony Thyssen A.Thyssen at griffith.edu.au
Sun Jan 13 19:49:50 EST 2013


On Thu, 10 Jan 2013 21:43:31 +0100
Michael Heerdegen <michael_heerdegen at web.de> wrote:
| Hello,
| 
| I'm sometimes a bit frightened that I might forget to terminate all X
| clients before exiting openbox, because this can sometimes be dangerous.
| 
| What would IMHO be helpful would be a (bool) parameter for the "Exit"
| action that would control this.  I.e., if the parameter is set true,
| display an (additional) warning like "There are still clients - really
| exit?".  Something like panels or dockapps would not count - I think
| candidates would be these things listed in the window list.
| 
| Would it be possible to implement something like that?  Or is it already
| possible to achieve this somehow?
| 

You could always download and use a very old application....

  XCloseDown

It first sends 'delete window' to all X window appliactions to ask them
politly to close their windows and exit.  Then afetr a moment sends a
'kill client' signal to force the X window program to kill off the client
connections.

So if teh client is good, it exits cleanly, otherwise it gets killed.

Note the worst clients I have seen has been web browsers, whcih ask
"Do you want to close all tabs". But in the end they too are killed off.


Note this shutdown includes openbox, and I have used it in a 'restart 
session' option in my own session handling script (".xsession" and
".xinitrc" control scripts).  It provides options, in order of impact...
   Poweroff, Reboot, Logout, Restart Cancel.  

The restart is not a logout, just a kill clients, and re-launch them again.
Clients include OpenBox, LXPanel, and any and all gnome daemons etc.
NOTE: Gnome has user daemons that survive X window kills, and even
logouts! I hate them, and kill them specifically.

Simply put while this will close X window clients it does not kill any
scripts that are not using X windows. As such you can arrange to kill
off all clients and not logout.

More typically however most 'sessions' are made dependant on some X
window client, and as such they too will exit and log you out.

Another alternative is for a session script, after using xclosedown, to
kill off all the users processes.  But then sometimes the user wants
a background 'daemonic' type job left alone. As such I don't recommend
this.

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 --------------------------------------------------------------------------
    If we knew what it was we were doing, it wouldn't be called research.
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/


More information about the openbox mailing list