[systemd-devel] dbus user services using the session bus

Matthew Monaco matt at 0x01b.net
Wed Apr 3 12:30:42 PDT 2013


On 04/03/2013 08:22 AM, Will Stephenson wrote:
> I'm joining the flock of desktop people investigating using systemd to start a
> desktop session.  So far I've checked out user-session-units and have created
> some more granular unit files that will do a native systemd start rather than
> u-s-u's wrapper around the upstream start script.
> 
> I'm stuck now, because I want to start a service with Type=dbus that puts a
> service on the session bus, however, I can't see a way to specify the bus in the
> unit file.
> 
> I don't want to use dbus activation here to start the service as that invokes
> the chicken-egg problem that the service in question (kdeinit) job is to start
> all the processes that will be calling it via dbus later. Long term I would like
> to do away with this and perform this task via systemd too, but Type=dbus on the
> session bus seems like a valid use case that should work.
> 
> I see there's a way to get the dbus session bus address into systemd because of
> the patch to fix this in user-session-units; would the right approach be to add
> a BusInstance= field to service and use the provided session bus address when
> watching for Type=dbus services that depend on user/dbus.service?
> 
> Any info greatly appreciated
> 
> Will
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Here are my user session units. I have a few dbus activated examples

https://github.com/mmonaco/systemd-user-session

I have one target for an i3 session and another for an openbox/cairo-dock
session. I can freely switch between them without losing my active windows. I'll
be testing gnome-3.8 soon so I'll be adding something that uses gnome-session.


More information about the systemd-devel mailing list