[LightDM] User login/logout scripts

Jaap Winius jwinius at umrk.nl
Sun Dec 23 16:11:37 PST 2012


On Sat, 22 Dec 2012 03:57:17 +0000, Jaap Winius wrote:

>> Or put it after 90x11 in /etc/X11/Xsession.d? That way, it will be
>> executed as $USER *after* the user session has finished.
> 
> Brilliant! I've tested this and it works. It looks like I can now have
> my cake and eat it. ...

Hold on. More tests revealed that this does not work after all. Whether I 
called it 90x12-custom_system-wide-logout, or 91x11-custom_system-wide-
logout, this script was actually being executed during the login process, 
directly after my 20x12-custom_system-wide-login script. I didn't 
immediately notice, because I was logging in and out within the same 
minute and did not include any time stamps in my test scripts.

> Regarding bugzilla.xfce.org, since this last solution also supports a
> system-wide logout script (run as $USER), I wonder if it would be worth
> submitting a feature request for the same functionality. I mean, if the
> Xfce developers already know that, what would be the point? Unless it
> would have some further advantage that I'm not aware of.

Well, now there's a bit more of a reason to do so. However, I can still 
do what I want without too much effort. I've now moved the system-wide 
logout script to /etc/Xsession/Xreset.d/ and am calling the /etc/Xsession/
Xreset script using the session-cleanup-script statement in lightdm.conf. 
This system-wide logout script is run as root, but all I do is use it to 
run "/usr/bin/sudo -u $USER <actual_system-wide_logout_script>" and voila.
 
Cheers,

Jaap




More information about the LightDM mailing list