dbus session access from remote
In order to turn off the music playing on my desktop (in audacious) from my laptop in another room, I must figure out the DBUS session, and set it up before using the audacious session management control (like “--play-pause“).
$ ssh MACHINE "set -x export DISPLAY=:0.0 PID=\$(pidof audacious) if [ -z \"\$PID\" ]; then rhythmbox-client –pause else export DBUS_SESSION_BUS_ADDRESS=\\ \$(cat /proc/\$PID/environ | xargs -0 -n1 \\ | grep ^DBUS_SESSION_BUS_ADDRESS= | cut -d= -f2-) audacious –play-pause fi”







