35902d
# DBus session bus over SSH with X11 forwarding
35902d
[ -z "$SSH_CONNECTION" ] && return
35902d
[ -z "$DISPLAY" ] && return
a0d93f
[ "${DISPLAY:0:1}" = ":" ] && return
a0d93f
[ "$SHLVL" -ne 1 ] && return
35902d
a0d93f
export GDK_BACKEND=x11
a0d93f
a0d93f
eval `dbus-launch --sh-syntax`
a0d93f
a0d93f
[ -z "$DBUS_SESSION_BUS_PID" ] && return
a0d93f
setsid -f /usr/libexec/dbus-1/dbus-kill-process-with-session "$DBUS_SESSION_BUS_PID"