Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using xdm and my ~/.Xsession looks like this:

# <initialization stuff here>

exec openbox

It works, but I've noticed that when I log out Openbox doesn't gracefully kill all the applications. In particular Google Chrome complains about that.

How can I make sure to wait for all processes to exit (just like others configurations: Gnome, KDE, Windows ...)?

The only (ugly) solution that I've found involves sleep and kill into ~/.Xsession.

share|improve this question

You need a session manager to gracefully kill the applications. openbox-session may do what you want. The documents explicitly say it doesn't do the saving session part, but it may do the gracefully kill part. openbox-gnome-session or openbox-kde-session will let you use the respective session managers while using openbox as your window manager.

share|improve this answer
Tried that, no way, same behavior. What else can I use as session manager? I can't see many (stand-alone) choices. – cYrus Aug 26 '10 at 20:00

Here's how I solved, I edited ~/.Xsession this way:

# <initialization stuff here>

openbox-session &

sleep 0.5 # time needed to start openbox

# <autostart applications here>

wait $WM_PID

for i in `ps -u $USER -o pid= | grep -v $$` ; do
    kill $i

sleep 1 # grace time

I can't find anything better by now. Maybe I should use a session manager but I don't know which one fits my case.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .