--- a/data/scripts/Xsession	2016-08-28 14:52:04.910181422 +0200
+++ b/data/scripts/Xsession	2017-10-21 15:25:47.668886596 +0200
@@ -50,6 +50,10 @@
     ;;
 esac
 
+# Make D-Bus and ConsoleKit start properly, see:
+# /etc/X11/xinit/xinitrc.d/{80-dbus,90-consolekit}
+command="$@"
+
 [ -f /etc/xprofile ] && . /etc/xprofile
 [ -f $HOME/.xprofile ] && . $HOME/.xprofile
 
@@ -94,8 +98,8 @@
   . "$USERXSESSION"
 fi
 
-if [ -z "$*" ]; then
+if [ -z "$command" ]; then
     exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
 else
-    exec $@
+    exec $command
 fi