forked from pool/xfce4-session
Accepting request 157122 from X11:xfce
Fix for the systemd inhibit issues OBS-URL: https://build.opensuse.org/request/show/157122 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfce4-session?expand=0&rev=61
This commit is contained in:
parent
62ddb9a32b
commit
bbc5e2c58f
@ -15,14 +15,13 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:/usr/share/glade3/catalogs"
|
||||
@@ -81,112 +75,19 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
@@ -81,112 +75,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
# load local modmap
|
||||
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
|
||||
|
||||
-# run xfce4-session if installed
|
||||
-if which xfce4-session >/dev/null 2>&1; then
|
||||
+test -x /usr/bin/systemd-inhibit && SYSTEMD_INHIBIT_CMD="systemd-inhibit --what=idle:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch "
|
||||
|
||||
-
|
||||
- # 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
|
||||
@ -43,7 +42,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
+# 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 ! ck-launch-session $SYSTEMD_INHIBIT_CMD xfce4-session; then
|
||||
+ if ! ck-launch-session xfce4-session; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Failed to start Xfce with consolekit support.
|
||||
+Aborted startup...
|
||||
@ -52,7 +51,10 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
fi
|
||||
-
|
||||
- exit 0
|
||||
-fi
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ xfce4-session
|
||||
fi
|
||||
-
|
||||
-##################
|
||||
-# IMPORTANT NOTE #
|
||||
@ -106,10 +108,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in
|
||||
- $cmd &
|
||||
- fi
|
||||
- done
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ $SYSTEMD_INHIBIT_CMD xfce4-session
|
||||
fi
|
||||
-fi
|
||||
-
|
||||
-xfdesktop&
|
||||
-orage &
|
||||
@ -158,14 +157,13 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
# Modify libglade and glade environment variables so that
|
||||
# it will find the files installed by Xfce
|
||||
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
|
||||
@@ -81,112 +75,19 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
@@ -81,112 +75,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp
|
||||
# load local modmap
|
||||
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
|
||||
|
||||
-# run xfce4-session if installed
|
||||
-if which xfce4-session >/dev/null 2>&1; then
|
||||
+test -x /usr/bin/systemd-inhibit && SYSTEMD_INHIBIT_CMD="systemd-inhibit --what=idle:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch "
|
||||
|
||||
-
|
||||
- # 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
|
||||
@ -186,7 +184,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
+# 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 ! ck-launch-session $SYSTEMD_INHIBIT_CMD xfce4-session; then
|
||||
+ if ! ck-launch-session xfce4-session; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Failed to start Xfce with consolekit support.
|
||||
+Aborted startup...
|
||||
@ -195,7 +193,10 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
fi
|
||||
-
|
||||
- exit 0
|
||||
-fi
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ xfce4-session
|
||||
fi
|
||||
-
|
||||
-##################
|
||||
-# IMPORTANT NOTE #
|
||||
@ -249,10 +250,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in
|
||||
- $cmd &
|
||||
- fi
|
||||
- done
|
||||
+else
|
||||
+ # start xfce4-session normally
|
||||
+ $SYSTEMD_INHIBIT_CMD xfce4-session
|
||||
fi
|
||||
-fi
|
||||
-
|
||||
-xfdesktop&
|
||||
-orage &
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 26 06:56:50 UTC 2013 - gber@opensuse.org
|
||||
|
||||
- removed systemd workaround in
|
||||
xfce4-session-adapt-session-scripts.patch now that
|
||||
xfce4-power-manager is patched
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 18 10:50:34 UTC 2012 - gber@opensuse.org
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user