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

Colin Guthrie colin at mageia.org
Thu Jan 8 03:55:30 PST 2015


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?

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.

I "solved" this by adding a user unit for gnome-termnial-server and
making dbus use systemd activation for it, but that just moves it to a
different cgroup. I guess it's OK like this.

One of the practical repercussions of this was that polkit auth from
gnome-terminal didn't work as the pids are not part of the same session.
This was fixed when I applied Kay's
http://cgit.freedesktop.org/polkit/commit/?id=a68f5dfd7662767b7b9822090b70bc5bd145c50c
to polkit.

But from now on things seem OK.

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

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list