[SailfishDevel] dbus-sessionbus connection fails

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Sat Feb 1 19:53:55 UTC 2014


I'm using QtDBus in my daemon (systemd service), and I can register my own service on systemBus, and also can connect to systembus signals.
When starting executable from command line it runs ok and connects also to the sessionbus signals successfully.
but when it is started via systemctl start I can't connect to sessionbus signals.

It throws following error:  "Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead"

this is printed from code below:

 if (!QDBusConnection::sessionBus().isConnected())

I figured out that DBUS_SESSION_BUS_ADDRESS  is an environment variable which obviously is not visible in this context.

is there a way to pass this to the systemd service??


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140201/0fdd5361/attachment.html>

More information about the Devel mailing list