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.

When I quit xmonad (Shift-Mod-Q), it kills all my running applications. This results in me losing my recent terminal history in gnome-terminal and in Chromium complaining on the next start up that it was shut down incorrectly.

How can I make xmonad quit the applications nicely?

I am running xmonad on ubuntu 12.04. I am not running it on top of gnome-session.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Install wmctrl using your package manager.

Then use this little script to close all of your windows gracefully

for win in $(wmctrl -l | awk '{print $1}'); do

wmctrl -i -c $win

done

Add this to your quit keybinding before xmonad exits itself.

I tested this with firefox and when I stared it next it, started correctly like I closed the window myself.

share|improve this answer
    
I ended up running XMonad on top of XFCE instead, so I don't have this problem anymore. I'm going to trust you that it works and accept this answer without testing it. –  Jonatan Kallus Dec 1 '13 at 15:09
    
You will need to enable xmonad.org/xmonad-docs/xmonad-contrib/… in order for this to work. –  Florian Mayer Apr 3 at 0:26
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.