Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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

# <initialization stuff here>

openbox-session &
WM_PID=$!

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
done

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.