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-)

-- 
gconfd does not refresh cache when sudo-ing current user to modify setting
https://bugs.launchpad.net/bugs/290647
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to