Skip to content

Instantly share code, notes, and snippets.

@XayOn
Created October 18, 2012 12:53
Show Gist options
  • Save XayOn/3911619 to your computer and use it in GitHub Desktop.
Save XayOn/3911619 to your computer and use it in GitHub Desktop.
Export dbus_session_bus_address on bashrc
# This checks if we're connecting via ssh, gets dbus-daemon --session address and exports it.
[[ -n $SSH_CLIENT ]] && export $(cat /proc/$(command pgrep -u "$USER" -f -- "dbus-daemon --session" )/environ| tr '\0' '\n' | command grep "DBUS_SESSION_BUS_ADDRESS=")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment