[systemd-devel] RFC: User sessions in systemd: `systemd --user` - code and experiences

Kok, Auke-jan H auke-jan.h.kok at intel.com
Mon Jun 11 10:19:06 PDT 2012


On Mon, Jun 11, 2012 at 7:48 AM, Darksecond <timmypcpeters at gmail.com> wrote:
> I have implemented this on my development machine and it is working
> wonderfully. i do have some questions regarding the user-session code.
> Systemd does not currently start systemd --user for a ssh shell, does it? Is
> there any way to make this work? to somehow run user-session for every
> session?

Spawning a new `systemd --user` for every ssh session defeats the purpose
entirely. What you want is that your ssh session connects to an existing systemd
--user session. Therefore, you can either 'autostart' a systemd --user session
on demand (which I haven't worked with, and I don't know if that
works), or you can
start one at boot time for every user.

Once you have your user session running, you can tap into it by setting
DBUS_SESSION_BUS_ADDRESS and point it to $XDG_RUNTIME_DIR/dbus/user_bus_socket
and stuff like systemctl --user start to work - no need to start
another instance.

Auke


More information about the systemd-devel mailing list