[systemd-devel] Help with pam_systemd..

Shawn Ferris shawn.ferris at gmail.com
Sun May 27 09:55:09 PDT 2012


On Sun, May 27, 2012 at 1:05 AM, Kok, Auke-jan H
<auke-jan.h.kok at intel.com> wrote:

> $ grep DBUS /usr/lib/systemd/system/user at .service
> Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/dbus/user_bus_socket

Yup.. had that

> $ cat /usr/lib/systemd/user/dbus.socket
> [Unit]
> Description=D-Bus System Message Bus Socket
>
> [Socket]
> ListenStream=%t/dbus/user_bus_socket

Had this too

> $ cat /usr/lib/systemd/user/dbus.service
> [Unit]
> Description=D-Bus System Message Bus
> Requires=dbus.socket
>
> [Service]
> ExecStartPre=/usr/bin/dbus-uuidgen --ensure
> ExecStartPre=-/bin/rm -f /var/run/messagebus.pid
> ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork
> --systemd-activation
> ExecReload=/usr/bin/dbus-send --print-reply --session
> --type=method_call --dest=org.freedesktop.DBus /
> org.freedesktop.DBus.ReloadConfig
> OOMScoreAdjust=-900

Damn.. I read that as '--address=system:' (not systemd) and assumed it
was a system service thing.. I had tried
'--address=unix:path=$XDG_RUNTIME_DIR/dbus/user_bus_socket' in it's
place, which obviously didn't help.

> Also, you can try to add
> export XDG_RUNTIME_DIR=/run/user/$USER
> export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/dbus/user_bus_socket
>
> into your ~/.bashrc or ~/.bash_profile, which should make your logins
> automatically see the right session bus.

With the fix '--address' fix above.. when I start user at .service
manually, it works beautifully! Woot! I think there must be a timing
issue though.. when I reboot, "systemd --user" starts, but nothing
else.. I'll have to check my dependencies are correct I presume.

Thanks again for your help Auke! I really do appreciate it!

Shawn


More information about the systemd-devel mailing list