I discovered this in Debian Edu when checking if logind can be used as a
data source for shutdown-at-night when it try to discover if a machine
is unused or not.
The output from loginctl when using ssh to log into a machine with no
console user logged in at the moment, look like this:
SESSION UID USER SEAT
c2 116 lightdm seat0
2 1000 pere
Note how the lightdm login screen is counted as a active login session
on seat0.
Can lightdm be changed to not show up as a active session when the login
screen is displayed?
I suspect it is caused by the /etc/pam.d/lightdm-greeter file listing
the pam_systemd.so module as optional. At least the problem is fixed
when removing this line. Perhaps that line should be removed in the
package?
I'm honestly quite reluctant to touch the PAM config blindly. Can you try with gdm and report your findings? The pam_systemd manpage gives a hint about a 'class' argument, which can be set to 'greeter', can you try with it? Regards,
Also could paste the output of loginctl show-session c2 ?