dbus should be started sooner in xinitrc. Specifically, its probably best to start it before starting anything that might use xinitrc (such as gnome-screensaver). This will ensure proper setup of the dbus session and also prevent hangs caused by race conditions when using older versions of libxcb. --- a/scripts/xinitrc.in.in +++ b/scripts/xinitrc.in.in @@ -53,6 +53,14 @@ # load local modmap test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap +# Use dbus-launch if installed. +if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then + dbuslaunch=`which dbus-launch` + if test x"$dbuslaunch" != x"" -a x"$dbuslaunch" != x"no"; then + eval `$dbuslaunch --sh-syntax --exit-with-session` + fi +fi + # Launch xscreensaver (if available), but only as non-root user if test $UID -gt 0 -a -z "$VNCSESSION"; then if test x"`which xscreensaver 2>/dev/null`" != x""; then @@ -74,14 +82,6 @@ fi fi -# Use dbus-launch if installed. -if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then - dbuslaunch=`which dbus-launch` - if test x"$dbuslaunch" != x"" -a x"$dbuslaunch" != x"no"; then - eval `$dbuslaunch --sh-syntax --exit-with-session` - fi -fi - # Run xfce4-session if installed xfcesm=`which xfce4-session` case "x$xfcesm" in