Orderly shutdown of running programs when quitting X
When I exit X or reboot from within X with shutdown, whatever running
programs are sort of rudely hung up. Gnome apps and Mozilla that seem
to save state at File|Quit don't appear to. Also sometimes my FGLRX
driver appears to lock up when I abruptly exit X (have to hard boot --
can't switch to different virtual terminal).
Is there a way to run a script before X exits, so that I can more
gracefully quit apps? More like Windows; although rude apps such as
Outlook can "hang" quitting.