Add another script hook, alike GDM's PostLogin hook

Reported by pberndt on 2011-10-17
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Wishlist
Unassigned

Bug Description

The problem with session-setup-script is that it's called /after/ starting the session in create_session(). I'd like to have a script called /before/ lightdm tries to do anything within the user's $HOME directory.

Why I find that useful: I encrypt user's home directories (or, partitions) in a pure desktop environment. The passphrases differ from the users' passwords, so I can't use PAM. With GDM's PostLogin hook I could ask for the user's passphrase after they tried to log in, in a graphical environment. This is not possible with the session-setup-script, because it apparently is only executed after the .XSession file is created, which is not possible because $HOME does not exist. Another purpose might be to provide new users with a graphical setup script prior to creating their home directories.

(Btw. when a user's $HOME does not exist, LightDM fails silently and returns to the login screen. IMHO the greeter should display an error message. It took me quite long to figure out why I can't use the session-setup-script for what I described above :-))

Changed in lightdm:
status: New → Triaged
importance: Undecided → Wishlist
Dan Metcalf (flactemnad) wrote :

I also have need of this function. GDM PostSession scripts are important for my installation.

Running mythtv, and sometimes the mythfrontend, audio or other component of the interface dies. When logging out of the GDM GUI interface I run scripts that kill all those related processes and then restore the related services automatically for a clean login everytime. I need this to work only for the GUI user, and the PostSession script worked great for that.

Michael Mauch (michael-mauch) wrote :

@Dan Metcalf:

At least since Ubuntu 12.04 there is now an option session-cleanup-script which can be added to the [SeatDefaults] section of /etc/lightdm/lightdm.conf. /usr/share/doc/lightdm/lightdm.conf.gz says:

# session-cleanup-script = Script to run when quitting a user session (runs as root)

(Thanks to Krytarik who posted this answer in http://ubuntuforums.org/showthread.php?t=1918649)

Paddy Landau (paddy-landau) wrote :

@Michael Mauch: There is one problem that I have discovered with the session-cleanup-script. If you have an encrypted folder, it is run after the decrypted folder has been dismounted and so it cannot do anything with the user's home files.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers