diff --git a/DBus-service.md b/DBus-service.md index b41ec77..075c0ff 100644 --- a/DBus-service.md +++ b/DBus-service.md @@ -222,3 +222,10 @@ Environment variable `DBUS_SESSION_BUS_ADDRESS` needs to be set. See [#394](http Under Mac OSX, the environment variable `DBUS_LAUNCHD_SESSION_BUS_SOCKET` needs to be set (see above). This can be done by issuing the command ```export DBUS_LAUNCHD_SESSION_BUS_SOCKET=$(launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET)``` + +#### DBus exception when calling dbus-send via Cron under Ubuntu + Failed to open connection to "session" message bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 + +Script started via Cron must export environment variable `DBUS_SESSION_BUS_ADDRESS` before calling dbus-send + +```export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus``` \ No newline at end of file