System-wide logout script?
jwinius at umrk.nl
Thu Sep 8 02:15:53 CEST 2011
Quoting Chris G <cl at isbd.net>:
> I asked for something like this a while ago and the answer was that
> there isn't such a thing.
Well, then perhaps I've found a workaround. Since Xfce is so
impoverished in this respect, use the display manager instead. If
you're like me and use gdm, you can add your logout code to
/etc/gdm/PostSession/Default. Otherwise, see:
Unfortunately this gdm script is executed as root, so additional
effort is needed to discover the identity of the previously logged in
user. For example:
ID=`tac /var/log/auth.log |grep -m1 pam_unix\(gdm:session\) |awk
No doubt there is a more elegant solution, but you get the idea.
More information about the Xfce