Debian – How to get Debian to use systemd-logind for user session control

debianlogindsession

I have one Debian Sid system that uses logind for its user sessions. It is odd that that system is not even running systemd. The logind sessions are independent of X and are in effect for the tty sessions before X is even started. However, I do not know how this occurred and even the distro's lead developer cannot explain it.

However, my main system is another Debian Sid distro (Siduction Linux) that is running systemd 204-7. logind is running and active, but it is not managing the user sessions. My question is, how would I go about switching session control from console-kit to logind?

Best Answer

Ok, I discovered a solution. I'm not sure how correct it is, but it is working, although with a few glitches.

The main solution was to add line

-session optional pam_systemd.so

to file /etc/pam.d/login and

session optional pam_systemd.so

to file /etc/pam.d/common-session. This requires package libpam-systemd.

This worked for sessions in a tty console, but still had no effect on gui sessions. In order to have it effective for gui sessions, I worked around that by bypassing slim, logging in at the console, and running startx.

Related Question