[LightDM] User login/logout scripts

Jaap Winius jwinius at umrk.nl
Fri Dec 21 07:53:13 PST 2012


On Fri, 21 Dec 2012 10:06:59 +0100, Guido Berhoerster wrote:

>> ... what is the most reliable way to determine the user account
>> name involved when these login and logout scripts are run?
> 
> Both scripts are called with USER/LOGNAME/HOME set, however they are not
> intended for that.

Okay, but at least it's an option.

> ... It is probably more appropriate to hook these scripts
> into the session wrapper and/or your window manager/desktop environment.

Indeed. I asked last year if Xfce had support for a system-wide logout 
script, but apparently not. It would be great if Xfce could run such a 
script as the user.

My session wrapper script, /etc/X11/Xsession, looks like a good way to 
run a system-wide login script: just drop it in the /etc/X11/Xsession.d/ 
directory. It also has a /etc/X11/Xreset.d/ directory for logout scripts; 
these are executed as root, but at least $USER is available.

Thanks again, Guido!

Cheers,

Jaap



More information about the LightDM mailing list