[systemd-devel] [PATCH] cgroups: chown user slices

Lennart Poettering lennart at poettering.net
Thu Jul 11 07:01:46 PDT 2013

On Thu, 11.07.13 09:40, Oleksii Shevchuk (alxchk at gmail.com) wrote:

> Ok. I trying to use current git. Nothing works for me. I.e. systemd --user
> starts, but I couldn't connect to it, because it doesn't connect to 
> d-bus (because dbus socket doesn't exists and systemd doesn't start dbus.socket
> probably). systemd starts X services, but they couldn't establish X
> connection.

Yeah, you need to set some env vars currently. The idea however is that
the X/dbus libraries learn to look into XDG_RUNTIME_DIR on their own.

> Generally I couldn't get the idea behind recent changes. How that supposed
> to work at all? How that
> 1) will interract with login managers (i.e. waits for systemd --user
> exits, selects proper starting unit or so)

Nobody needs to wait for systemd --user exits. It will just exist in the
background as long as the user is logged in and will go away as soon as
he logs out entirely. It is refernce counted by the login sessions. 

> 2) will setup environment from user profile
> 3) will setup temporary files for user temporary folder (dbus folder,
> for example)
> 4) will work with different login paths (ssh, local VT login, X login)
> Now i have lightdm that explicity starts systemd --user as session
> process. With Marc-Antoine patch that still works ok, so I will fall 
> back to it and wait for some clarifications

Yeah, starting it directly in the session is not really how we intended
it to be used, and it's problematic due to access to the cgroupfs. You
can make it work by manually granting yourself write access to the
cgroupfs subtree, but that's a hack for debugging purposes only.


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list