[systemd-devel] DBus api of systemd user instance
Mantas Mikulėnas
grawity at gmail.com
Fri Mar 6 22:45:42 PST 2015
On Fri, Mar 6, 2015 at 6:23 PM, Ragnar Thomsen <rthomsen6 at gmail.com> wrote:
> Hey List,
>
> Does the user instance of systemd expose a dbus api?
>
Yes, that's what `systemctl` uses.
> If yes, how does one access it?
>
Much like the system instance – either over the DBus "user" bus, or over
the dedicated private socket ($XDG_RUNTIME_DIR/systemd/private).
~
Although, to have the "user" bus, you'll need to obtain user/dbus.service &
user/dbus.socket from somewhere.
They were added DBus 1.9 just a few weeks ago, but you can also get them
separately from https://wiki.archlinux.org/index.php/Systemd/User#D-Bus.
...and then you might (or might not, I forgot) need to point user at .service
at it:
# system/user at .service.d/bus.conf
[Service]
Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/dev/kdbus/%I-user/bus;unix:path=/run/user/%I/bus
~
So you'll still need to use the private socket (at least as fallback), I
think.
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150307/778fa64b/attachment.html>
More information about the systemd-devel
mailing list