[systemd-devel] Help with pam_systemd..

Kok, Auke-jan H auke-jan.h.kok at intel.com
Sun May 27 00:13:13 PDT 2012


On Sun, May 27, 2012 at 5:51 AM, Shawn Ferris <shawn.ferris at gmail.com> wrote:
> On Sat, May 26, 2012 at 10:00 PM, Shawn Ferris <shawn.ferris at gmail.com> wrote:
>>> 1) systemctl --system start user@<username>.service (may not work, but is
>>> usable as a template)
>>> 2) ../user/default.target needs to define something meaningful
>>> 3) "session optional pam_systemd.so" in /etc/pam.d/systemd-auth
>>> 4) proper dbus.socket/dbus.service in ../user/ if you need a session bus
>>>
>>> without any of these, nothing will happen.
>>
>> Ok.. thanks Auke! I guess I'm a little surprised that having a
>> user@<username>.service and all that jazz is a requirement just to get
>> a simple shell. I'll give it a shot though. Appreciate the patience!

so specifically for that part, I haven't done anything yet to "glue"
systemd --user
to each and every login shell, and I actually would not prefer to do this right
now.

My interest and implementations are all auto-login graphical desktops (such as
the Tizen phone/mobile UI), but I've also done enlightenment and Xfce4
desktops. No gdm either. From that perspective, we already always start a
systemd --user instance at boot, so it makes no sense to start one
on "login" from ssh, or a local console login. Ultimately that's something
the login manager should do (and can, after all it could just call `systemctl
start user@<username>.service` for you).

pam_systemd.so should setup $XDG_RUNTIME_DIR, but I don't think it sets up
DBUS_SESSION_BUS_ADDRESS as you pointed out, perhaps this is something
related to the initial dbus handling in systemd that's not entirely
right yet, after all it prints out 1 spurious dbus message when the
user instance starts.

I'm slowly working my way through all the bits myself and there's a bigger
one that I'm chasing now that I'd like to close first.

Cheers,

Auke


More information about the systemd-devel mailing list