[systemd-devel] DBus api of systemd user instance
Alexandre Detiste
alexandre.detiste at gmail.com
Sat Mar 7 00:05:33 PST 2015
Hi Ragnar,
I found out and published answer on your Github bug tracker
https://github.com/rthomsen/kcmsystemd/issues/17 .
It seems as simple a using Qt's buitlin "QDBusConnection::sessionBus()"
(qdbusviewer does that).
Alexandre
Le samedi 7 mars 2015, 08:45:42 Mantas Mikulėnas a écrit :
> 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.
>
>
More information about the systemd-devel
mailing list