Distinguish between logout and shutdown in KDE / GNOME
I've got a script which runs after a graphical logout using either KDM or GDM.
It's called from
/etc/gdm/PostSession/Default
or
/etc/kde3/kdm/Xreset
Depending on whether you're using KDM or GDM.
What I'm trying to do now is find some way to distinguish between a user who is logging out and a user who is shutting down the machine so that I can run the script in one case, but not the other.
I'm completely stumped as to how to do this, GDM and KDM don't seem to keep track of it internally, but I suppose it doesn't change their operation. Any suggestions will be great.
Cheers
|