4

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.

2 Answers 2

1

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.

1
  • 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, 2010 at 20:00
1

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.

You must log in to answer this question.

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