linuxmint / mint20-beta

BETA Bug Squah Rush
20 stars 8 forks source link

lightdm session-cleanup-script not working #192

Open ewangi opened 4 years ago

ewangi commented 4 years ago

In Mint 19.3 MATE, in order to unmount VeraCrypt volumes on logout, I create the file /etc/lightdm/veracrypt-logout.sh, apply chmod +x to it, and populate it with the following:

#!/bin/sh

/usr/bin/veracrypt -fd
pkill veracrypt

I then add the following lines to the start of /etc/lightdm/lightdm.conf:

[SeatDefaults]
session-cleanup-script=/etc/lightdm/veracrypt-logout.sh

This works fine, but the same procedure does not work on Mint 20. It is slightly different on Mint 20 because /etc/lightdm/lightdm.conf does not exist by default so I have created it instead. When this didn't work, I also tried adding the session-cleanup-script line to /etc/lightdm/lightdm.conf.d/70-linuxmint.conf but that did not work either.

By "not working", I mean that the commands in veracrypt-logout.sh appear not to be executed. I am using the same version of VeraCrypt on up-to-date versions of Mint 19.3 MATE and Mint 20 MATE when experiencing this discrepancy between the two versions of Mint.

xenopeek commented 4 years ago

lightdm comes from the Ubuntu focal package base so this sounds upstream. Can you retest on Ubuntu 20.04 LTS and confirm it does work there?

Is there anything in /var/log/lightdm/ logfiles that gives a clue?

Mind that [SeatDefaults] is deprecated. Use [Seat:*] instead. Though I think lightdm still loads [SeatDefaults] section and merges it with [Seat:*].