[systemd-devel] Questions regarding dbus started via systemd --user

Lennart Poettering lennart at poettering.net
Thu Jan 8 05:19:53 PST 2015


On Thu, 08.01.15 11:55, Colin Guthrie (colin at mageia.org) wrote:

> Hi,
> 
> I'm just playing around with this and making some progress.
> 
> I've got a modified dbus-launch that can be slotted in nicely to poke
> dbus activated via systemd and teach it about the environment for
> subsequent launching. It also pokes systemd --user with the environment
> too. It's pretty simply and allows for experimentation without too much
> impact.
> 
> The issue I currently have is that the dbus daemon itself is now part of
> the user at .service cgroup and NOT part of the session cgroup
> 
> i.e. here it is:
> 
> 4:devices:/user.slice,1:name=systemd:/user.slice/user-603.slice/user at 603.service/dbus.service
> 
> rather than in say:
> 
> 4:devices:/user.slice,1:name=systemd:/user.slice/user-603.slice/session-c2.scope
> 
> I guess my question is: Is this OK?

Yes, the idea is that these services become singleton services of the
user, and the sessions ultimately only retain a "stub" process that
does little more than maybe invoke something via systemd and hang
around until log out.

> It does have repercussions.
> 
> In GNOME for example, gnome-terminal is started via dbus activation
> (gnome-terminal-server). This means all processes started inside
> gnome-terminal actually are part of
> 4:devices:/user.slice,1:name=systemd:/user.slice/user-603.slice/user at 603.service/dbus.service
> cgroup.

Yeah, non-converted bus services will appear as part of
dbus.service. That is ugly of course. 

I kinda stopped pushing the per-user stuff until kdbus is done,
because this all resolves itself then, because bus services are then
converted into native systemd services.

> Is there any problems that people can think of of running such a setup
> now without any further compartmentalisation or changes?

Well, it's little tested, and I wish this would just work out of the
box. But again, I am kinda waiting for kdbus to finally be a done deal
before revisiting and pushing for this again...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list