Yes, I agree this isn't a bug so much as a "feature change"...
A workaround as recommended upstream is to export the DBUS_SESSION_BUS_ADDRESS with the sudo command, i.e., sudo -u $USER DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS <command>
In the case that one is running a script that doesn't *have* the right DBUS_SESSION_BUS_ADDRESS variable, it can be retrieved for an arbitrary user with the following snippet:
DBUS_SESSION_BUS_ADDRESS=$(sudo -u $USER dbus-launch --autolaunch=`cat /var/lib/dbus/machine-id` | grep BUS_ADDRESS | cut -d '=' -f 2-)
Yes, I agree this isn't a bug so much as a "feature change"...
A workaround as recommended upstream is to export the DBUS_SESSION_ BUS_ADDRESS with the sudo command, i.e., sudo -u $USER DBUS_SESSION_ BUS_ADDRESS= $DBUS_SESSION_ BUS_ADDRESS <command>
In the case that one is running a script that doesn't *have* the right DBUS_SESSION_ BUS_ADDRESS variable, it can be retrieved for an arbitrary user with the following snippet: BUS_ADDRESS= $(sudo -u $USER dbus-launch --autolaunch=`cat /var/lib/ dbus/machine- id` | grep BUS_ADDRESS | cut -d '=' -f 2-)
DBUS_SESSION_