I would like to do banshee --next
, or just control banshee in general, from a virtual console (e.g., the one I get when I press Ctr-Alt-F1).
Is that possible? How can I do it?
I would like to do banshee --next
, or just control banshee in general, from a virtual console (e.g., the one I get when I press Ctr-Alt-F1).
Is that possible? How can I do it?
It turns out my X session with dbus running has the following environment variable set, which is accessible from all terminal emulators in X:
DBUS_SESSION_BUS_ADDRESS
It's contents (`echo $DBUS_SESSION_BUS_ADDRESS) appear to denote the Unix socket used by Dbus.
Getting banshee terminal commands to work in a virtual console has turned out to be a simple matter of sharing that value with the virtual terminal.
To automate it, I wrote the following simple script:
$ cat get_dbus_addr.sh
#!/bin/bash
#Use this file for sharing the most recent DBus socket address
FILE="/tmp/${USER}_DBUS_SESSION_BUS_ADDRESS"
if [ ! -z "$DBUS_SESSION_BUS_ADDRESS" ]
then
echo $DBUS_SESSION_BUS_ADDRESS > "$FILE"
else
export DBUS_SESSION_BUS_ADDRESS=`cat "$FILE"`
fi
I source the script from the appropriate terminal config files (so that it gets sourced in both GUI and in the virtual console). Sourcing it in the GUI saves the value to the sharing file in /tmp and sourcing it in a Virtual console (where the ENV variable isn't set) loads it.