summaryrefslogtreecommitdiff
path: root/scripts/xinitrc.in.in
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-02-25 10:47:31 +0100
committerNick Schermer <nick@xfce.org>2012-03-24 22:24:36 +0100
commit77297eb6a5927423d3c82bcc358f236755090b17 (patch)
tree2791959bc5e82b774653b71acfb0e91431dca98c /scripts/xinitrc.in.in
parent03d0fc76a246c0ba90bc0684cc3562630917a0c4 (diff)
downloadxfce4-session-77297eb6a5927423d3c82bcc358f236755090b17.tar.gz
Add support for launching xfce4-session in consolekit.
Add commandline support to xinitrc to launch xfce4-session with ck-launch-session. This will properly launch xfce4-session in an active session, including dbus-launch (with is now handled by xfce4-session).
Diffstat (limited to 'scripts/xinitrc.in.in')
-rwxr-xr-xscripts/xinitrc.in.in34
1 files changed, 25 insertions, 9 deletions
diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index 2bfaa45d..862f5cef 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -2,11 +2,11 @@
# fix broken $UID on some system...
if test "x$UID" = "x"; then
- if test -x /usr/xpg4/bin/id; then
- UID=`/usr/xpg4/bin/id -u`;
- else
- UID=`id -u`;
- fi
+ if test -x /usr/xpg4/bin/id; then
+ UID=`/usr/xpg4/bin/id -u`;
+ else
+ UID=`id -u`;
+ fi
fi
# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
@@ -38,7 +38,6 @@ if test "x$XDG_CACHE_HOME" = "x" ; then
fi
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
-
# set up XDG user directores. see
# http://freedesktop.org/wiki/Software/xdg-user-dirs
if which xdg-user-dirs-update >/dev/null 2>&1; then
@@ -84,14 +83,31 @@ cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
-# Run xfce4-session if installed
+# run xfce4-session if installed
if which xfce4-session >/dev/null 2>&1; then
+
+ # check if we start xfce4-session with ck-launch-session. this is only
+ # required for starting from a console, not a login manager
+ if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
+ if which ck-launch-session >/dev/null 2>&1; then
+ ck-launch-session xfce4-session
+ else
+ echo
+ echo "You have tried to start Xfce with consolekit support, but"
+ echo "ck-launch-session is not installed."
+ echo "Aborted startup..."
+ echo
+
+ exit 1
+ fi
+ else
+ # start xfce4-session normally
xfce4-session
+ fi
- exit 0
+ exit 0
fi
-
##################
# IMPORTANT NOTE #
##################