DBus exception when calling dbus-send via Cron under Ubuntu

teatower 2023-06-17 17:59:53 +02:00
parent 29778bff4c
commit 12aa2293c4

@ -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```