Run dbus-launch only if $XDG_RUNTIME_DIR/bus isn't available
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 21 Nov 2016 22:08:47 +0000 (00:08 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 21 Nov 2016 22:08:47 +0000 (00:08 +0200)
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836064 for explanation.

startlxde.in

index fc70fdd..92a6690 100755 (executable)
@@ -27,7 +27,9 @@ export SAL_USE_VCLPLUGIN=gtk
 
 # Launch DBus if needed
 if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
-       eval "$(dbus-launch --sh-syntax --exit-with-session)"
+       if test -z "$XDG_RUNTIME_DIR" -o ! -S "$XDG_RUNTIME_DIR/bus" -o ! -O "$XDG_RUNTIME_DIR/bus"; then
+               eval "$(dbus-launch --sh-syntax --exit-with-session)"
+       fi
 fi
 
 export XDG_MENU_PREFIX="lxde-"