diff --git a/xfce4-session-adapt-session-scripts.patch b/xfce4-session-adapt-session-scripts.patch index 4e4865b..487dfbe 100644 --- a/xfce4-session-adapt-session-scripts.patch +++ b/xfce4-session-adapt-session-scripts.patch @@ -15,13 +15,14 @@ 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,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp +@@ -81,112 +75,19 @@ 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 @@ -42,7 +43,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 xfce4-session; then ++ if ! ck-launch-session $SYSTEMD_INHIBIT_CMD xfce4-session; then + cat >&2 <<'EOF' +Failed to start Xfce with consolekit support. +Aborted startup... @@ -51,10 +52,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in fi - - exit 0 -+else -+ # start xfce4-session normally -+ xfce4-session - fi +-fi - -################## -# IMPORTANT NOTE # @@ -108,7 +106,10 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in - $cmd & - fi - done --fi ++else ++ # start xfce4-session normally ++ $SYSTEMD_INHIBIT_CMD xfce4-session + fi - -xfdesktop& -orage & @@ -157,13 +158,14 @@ 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,17 @@ cat /dev/null $XRESOURCES | xrdb -nocpp +@@ -81,112 +75,19 @@ 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 @@ -184,7 +186,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 xfce4-session; then ++ if ! ck-launch-session $SYSTEMD_INHIBIT_CMD xfce4-session; then + cat >&2 <<'EOF' +Failed to start Xfce with consolekit support. +Aborted startup... @@ -193,10 +195,7 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in fi - - exit 0 -+else -+ # start xfce4-session normally -+ xfce4-session - fi +-fi - -################## -# IMPORTANT NOTE # @@ -250,7 +249,10 @@ Index: xfce4-session-4.10.0/scripts/xinitrc.in.in - $cmd & - fi - done --fi ++else ++ # start xfce4-session normally ++ $SYSTEMD_INHIBIT_CMD xfce4-session + fi - -xfdesktop& -orage & diff --git a/xfce4-session.changes b/xfce4-session.changes index 88fcc8c..18b7902 100644 --- a/xfce4-session.changes +++ b/xfce4-session.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Dec 18 10:50:34 UTC 2012 - gber@opensuse.org + +- changed xfce4-session-adapt-session-scripts.patch so that it the + session is wrapped with systemd-inhibit in order to work around + systemd's broken defaults of handling suspend/hibernate-keys and + the lidswitch which interferes with xfce4-power-manager + (bnc#789057), this unconditionally disables systemd's handling of + these keys regardless of its settings or whether + xfce4-power-manager actually runs in the session or not + ------------------------------------------------------------------- Fri Sep 28 13:25:45 UTC 2012 - gber@opensuse.org diff --git a/xfce4-session.spec b/xfce4-session.spec index 092d93c..72e6abf 100644 --- a/xfce4-session.spec +++ b/xfce4-session.spec @@ -1,7 +1,7 @@ # # spec file for package xfce4-session # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,7 +28,7 @@ Url: http://docs.xfce.org/xfce/xfce4-session/start Source0: http://archive.xfce.org/src/xfce/xfce4-session/4.10/%{name}-%{version}.tar.bz2 # PATCH-FEATURE-OPENSUSE xfce4-session-simple-splash-remove-shadows.patch gber@opensuse.org -- Improves readability of the simple splash engine text by removing the text shadows Patch0: xfce4-session-simple-splash-remove-shadows.patch -# PATCH-FIX-OPENSUSE xfce4-session-adapt-session-scripts.patch gber@opensuse.org -- Adapt upstream sessions script to openSUSE +# PATCH-FIX-OPENSUSE xfce4-session-adapt-session-scripts.patch bnc#789057 gber@opensuse.org -- Adapt upstream sessions script to openSUSE Patch1: xfce4-session-adapt-session-scripts.patch # PATCH-FIX-UPSTREAM xfce4-session-handle-multiple-interactive-session-save.patch bxo#5379 gber@opensuse.org -- Handle multiple interactive session save correctly (backported from upstream git) Patch2: xfce4-session-handle-multiple-interactive-session-save.patch