System-wide logout script?

Chris G cl at
Thu Sep 8 10:03:59 CEST 2011

On Thu, Sep 08, 2011 at 02:15:53AM +0200, Jaap Winius wrote:
> Quoting Chris G <cl at>:
> >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
> '{print $11}'`
> No doubt there is a more elegant solution, but you get the idea.
Yes, I did find that possible route but it's not perfect.

Chris Green

More information about the Xfce mailing list