Browse Source

Fix cadence initialization in .xinitrc

The D-Bus session bus address needs to be configured before all
applications that depend on it.
Frans Bergman 2 years ago
parent
commit
7d22d75513
1 changed files with 8 additions and 7 deletions
  1. 8 7
      .xinitrc

+ 8 - 7
.xinitrc

@@ -1,5 +1,12 @@
 #!/bin/sh
 
+# test for an existing bus daemon, just to be safe
+if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+    # if not found, launch a new one
+    eval `dbus-launch --sh-syntax --exit-with-session`
+    echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
+fi
+
 xrandr --output DVI-I-1 --auto --left-of DP-2
 xrandr --output HDMI-0 --mode 3840x2160 --rate 59.94 --right-of DP-2
 
@@ -9,14 +16,8 @@ xset -dpms
 
 [ -f ~/.Xresources ] && xrdb -merge -I"$HOME" ~/.Xresources
 
-cadence-session-start --start
 
-# test for an existing bus daemon, just to be safe
-if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
-    # if not found, launch a new one
-    eval `dbus-launch --sh-syntax --exit-with-session`
-    echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
-fi
+cadence-session-start --maybe-system-start
 
 export GTK_IM_MODULE='ibus'
 export QT_IM_MODULE='ibus'