From 58693e65cb56000116281c724ba309014f0076d4ffc5b445dca288155bd9556f Mon Sep 17 00:00:00 2001 From: andrea florio Date: Mon, 7 Jun 2010 14:15:15 +0000 Subject: [PATCH 1/8] - changed RPM Group to System/GUI/LXDE OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=26 --- lxsession.changes | 5 +++++ lxsession.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lxsession.changes b/lxsession.changes index 896977b..3503667 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 7 14:18:10 UTC 2010 - andrea@opensuse.org + +- changed RPM Group to System/GUI/LXDE + ------------------------------------------------------------------- Mon Apr 5 19:00:33 UTC 2010 - andrea@opensuse.org diff --git a/lxsession.spec b/lxsession.spec index 2cf7ffc..c4e5aab 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -22,7 +22,7 @@ Name: lxsession Version: 0.4.4 Release: 1 Summary: LXDE Session Manager, required for running the desktop environment -Group: System/GUI/Other +Group: System/GUI/LXDE License: GPL Url: http://www.lxde.org/ Source0: %{name}-%{version}.tar.bz2 From dc73a06d42315f52000ca443a793c147b9b01b2ddb64a730dd5d0c480eb3c100 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Sun, 13 Jun 2010 22:44:22 +0000 Subject: [PATCH 2/8] Accepting request 41373 from X11:lxde checked in (request 41373) OBS-URL: https://build.opensuse.org/request/show/41373 OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=27 --- lxsession.changes | 5 ----- lxsession.spec | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lxsession.changes b/lxsession.changes index 3503667..896977b 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jun 7 14:18:10 UTC 2010 - andrea@opensuse.org - -- changed RPM Group to System/GUI/LXDE - ------------------------------------------------------------------- Mon Apr 5 19:00:33 UTC 2010 - andrea@opensuse.org diff --git a/lxsession.spec b/lxsession.spec index c4e5aab..2cf7ffc 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -22,7 +22,7 @@ Name: lxsession Version: 0.4.4 Release: 1 Summary: LXDE Session Manager, required for running the desktop environment -Group: System/GUI/LXDE +Group: System/GUI/Other License: GPL Url: http://www.lxde.org/ Source0: %{name}-%{version}.tar.bz2 From 69a73643919c35c02e3795a51c1fd79db0d677a4cb400d4388c20dcdc8cc6fa1 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Tue, 13 Jul 2010 22:31:45 +0000 Subject: [PATCH 3/8] Accepting request 42889 from home:gberh:branches:X11:lxde Copy from home:gberh:branches:X11:lxde/lxsession via accept of submit request 42889 revision 2. Request was accepted with message: OK OBS-URL: https://build.opensuse.org/request/show/42889 OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=28 --- lxsession-0.4.4-lock-screen.patch | 99 +++++++++++++++++++++++++++++++ lxsession.changes | 11 ++++ lxsession.spec | 8 ++- 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 lxsession-0.4.4-lock-screen.patch diff --git a/lxsession-0.4.4-lock-screen.patch b/lxsession-0.4.4-lock-screen.patch new file mode 100644 index 0000000..c60b93d --- /dev/null +++ b/lxsession-0.4.4-lock-screen.patch @@ -0,0 +1,99 @@ +diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.4/lxsession-logout/lxsession-logout.c +--- lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c 2010-03-31 18:28:50.000000000 +0200 ++++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-14 00:10:28.000000000 +0200 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -72,6 +73,7 @@ + int ltsp : 1; /* under LTSP environment */ + } HandlerContext; + ++static gboolean lock_screen(void); + static gboolean verify_running(char * display_manager, char * executable); + static void logout_clicked(GtkButton * button, HandlerContext * handler_context); + static void shutdown_clicked(GtkButton * button, HandlerContext * handler_context); +@@ -83,6 +85,52 @@ + static GtkPositionType get_banner_position(void); + static GdkPixbuf * get_background_pixbuf(void); + ++/* Try to lock the screen, return TRUE on success, FALSE if no suitable ++ * screensaver was found or the screensaver command exited abnormally. ++ */ ++static gboolean lock_screen(void) ++{ ++ gchar *dummy; ++ gint exit_status; ++ ++ if ((dummy = g_find_program_in_path("xscreensaver-command")) != NULL) ++ { ++ g_spawn_command_line_sync("xscreensaver-command -lock", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else if ((dummy = g_find_program_in_path("gnome-screensaver-command")) != ++ NULL) ++ { ++ g_spawn_command_line_sync("gnome-screensaver-command --lock", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else if ((dummy = g_find_program_in_path("xlock")) != NULL) ++ { ++ g_spawn_command_line_sync("xlock -mode blank", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else ++ { ++ return FALSE; ++ } ++ ++ g_free(dummy); ++ ++ if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ + /* Verify that a program is running and that an executable is available. */ + static gboolean verify_running(char * display_manager, char * executable) + { +@@ -187,6 +235,8 @@ + /* Handler for "clicked" signal on Suspend button. */ + static void suspend_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->suspend_DeviceKit) + dbus_DeviceKit_Suspend(); + else if (handler_context->suspend_HAL) +@@ -197,6 +247,8 @@ + /* Handler for "clicked" signal on Hibernate button. */ + static void hibernate_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->hibernate_DeviceKit) + dbus_DeviceKit_Hibernate(); + else if (handler_context->hibernate_HAL) +@@ -207,6 +259,8 @@ + /* Handler for "clicked" signal on Switch User button. */ + static void switch_user_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->switch_user_GDM) + g_spawn_command_line_sync("gdmflexiserver --startnew", NULL, NULL, NULL, NULL); + else if (handler_context->switch_user_KDM) diff --git a/lxsession.changes b/lxsession.changes index 896977b..02dc9a8 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jul 13 22:12:42 UTC 2010 - guido+opensuse.org@berhoerster.name + +- lock screen when suspending/hibernating/switching users, fixes + bnc#622083 + +------------------------------------------------------------------- +Mon Jun 7 14:18:10 UTC 2010 - andrea@opensuse.org + +- changed RPM Group to System/GUI/LXDE + ------------------------------------------------------------------- Mon Apr 5 19:00:33 UTC 2010 - andrea@opensuse.org diff --git a/lxsession.spec b/lxsession.spec index 2cf7ffc..a7dee67 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -20,12 +20,15 @@ Name: lxsession Version: 0.4.4 -Release: 1 +Release: 2 Summary: LXDE Session Manager, required for running the desktop environment -Group: System/GUI/Other +Group: System/GUI/LXDE License: GPL Url: http://www.lxde.org/ Source0: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM lxsession-0.4.4-lock-screen.patch bnc# guido+opensuse.org@berhoerster.name +# lxsession-logout should lock the screen before suspending/hibernating/switching users, this fixes bnc#622083 +Patch0: %{name}-0.4.4-lock-screen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt @@ -42,6 +45,7 @@ Authors: %prep %setup -q -n %name-%version +%patch0 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" From 22ee210ec7b9e8d068999b07d2c753bc0123d7e5057bcdfd38ba7351d3b894f0 Mon Sep 17 00:00:00 2001 From: andrea florio Date: Wed, 14 Jul 2010 08:43:33 +0000 Subject: [PATCH 4/8] OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=29 --- lxsession-0.4.4-lock-screen.patch | 99 ------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 lxsession-0.4.4-lock-screen.patch diff --git a/lxsession-0.4.4-lock-screen.patch b/lxsession-0.4.4-lock-screen.patch deleted file mode 100644 index c60b93d..0000000 --- a/lxsession-0.4.4-lock-screen.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.4/lxsession-logout/lxsession-logout.c ---- lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c 2010-03-31 18:28:50.000000000 +0200 -+++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-14 00:10:28.000000000 +0200 -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -72,6 +73,7 @@ - int ltsp : 1; /* under LTSP environment */ - } HandlerContext; - -+static gboolean lock_screen(void); - static gboolean verify_running(char * display_manager, char * executable); - static void logout_clicked(GtkButton * button, HandlerContext * handler_context); - static void shutdown_clicked(GtkButton * button, HandlerContext * handler_context); -@@ -83,6 +85,52 @@ - static GtkPositionType get_banner_position(void); - static GdkPixbuf * get_background_pixbuf(void); - -+/* Try to lock the screen, return TRUE on success, FALSE if no suitable -+ * screensaver was found or the screensaver command exited abnormally. -+ */ -+static gboolean lock_screen(void) -+{ -+ gchar *dummy; -+ gint exit_status; -+ -+ if ((dummy = g_find_program_in_path("xscreensaver-command")) != NULL) -+ { -+ g_spawn_command_line_sync("xscreensaver-command -lock", -+ NULL, -+ NULL, -+ &exit_status, -+ NULL); -+ } -+ else if ((dummy = g_find_program_in_path("gnome-screensaver-command")) != -+ NULL) -+ { -+ g_spawn_command_line_sync("gnome-screensaver-command --lock", -+ NULL, -+ NULL, -+ &exit_status, -+ NULL); -+ } -+ else if ((dummy = g_find_program_in_path("xlock")) != NULL) -+ { -+ g_spawn_command_line_sync("xlock -mode blank", -+ NULL, -+ NULL, -+ &exit_status, -+ NULL); -+ } -+ else -+ { -+ return FALSE; -+ } -+ -+ g_free(dummy); -+ -+ if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 0) -+ return TRUE; -+ -+ return FALSE; -+} -+ - /* Verify that a program is running and that an executable is available. */ - static gboolean verify_running(char * display_manager, char * executable) - { -@@ -187,6 +235,8 @@ - /* Handler for "clicked" signal on Suspend button. */ - static void suspend_clicked(GtkButton * button, HandlerContext * handler_context) - { -+ lock_screen(); -+ - if (handler_context->suspend_DeviceKit) - dbus_DeviceKit_Suspend(); - else if (handler_context->suspend_HAL) -@@ -197,6 +247,8 @@ - /* Handler for "clicked" signal on Hibernate button. */ - static void hibernate_clicked(GtkButton * button, HandlerContext * handler_context) - { -+ lock_screen(); -+ - if (handler_context->hibernate_DeviceKit) - dbus_DeviceKit_Hibernate(); - else if (handler_context->hibernate_HAL) -@@ -207,6 +259,8 @@ - /* Handler for "clicked" signal on Switch User button. */ - static void switch_user_clicked(GtkButton * button, HandlerContext * handler_context) - { -+ lock_screen(); -+ - if (handler_context->switch_user_GDM) - g_spawn_command_line_sync("gdmflexiserver --startnew", NULL, NULL, NULL, NULL); - else if (handler_context->switch_user_KDM) From 1bc37fd328c6b2e2e0c63ac770d427c5525262513dcbc6be4617814c8258269c Mon Sep 17 00:00:00 2001 From: andrea florio Date: Wed, 14 Jul 2010 08:44:57 +0000 Subject: [PATCH 5/8] - spec file clean up OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=30 --- lxsession-0.4.4-lock-screen-bnc622083.patch | 99 +++++++++++++++++++++ lxsession.changes | 5 ++ lxsession.spec | 6 +- 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 lxsession-0.4.4-lock-screen-bnc622083.patch diff --git a/lxsession-0.4.4-lock-screen-bnc622083.patch b/lxsession-0.4.4-lock-screen-bnc622083.patch new file mode 100644 index 0000000..c60b93d --- /dev/null +++ b/lxsession-0.4.4-lock-screen-bnc622083.patch @@ -0,0 +1,99 @@ +diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.4/lxsession-logout/lxsession-logout.c +--- lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c 2010-03-31 18:28:50.000000000 +0200 ++++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-14 00:10:28.000000000 +0200 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -72,6 +73,7 @@ + int ltsp : 1; /* under LTSP environment */ + } HandlerContext; + ++static gboolean lock_screen(void); + static gboolean verify_running(char * display_manager, char * executable); + static void logout_clicked(GtkButton * button, HandlerContext * handler_context); + static void shutdown_clicked(GtkButton * button, HandlerContext * handler_context); +@@ -83,6 +85,52 @@ + static GtkPositionType get_banner_position(void); + static GdkPixbuf * get_background_pixbuf(void); + ++/* Try to lock the screen, return TRUE on success, FALSE if no suitable ++ * screensaver was found or the screensaver command exited abnormally. ++ */ ++static gboolean lock_screen(void) ++{ ++ gchar *dummy; ++ gint exit_status; ++ ++ if ((dummy = g_find_program_in_path("xscreensaver-command")) != NULL) ++ { ++ g_spawn_command_line_sync("xscreensaver-command -lock", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else if ((dummy = g_find_program_in_path("gnome-screensaver-command")) != ++ NULL) ++ { ++ g_spawn_command_line_sync("gnome-screensaver-command --lock", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else if ((dummy = g_find_program_in_path("xlock")) != NULL) ++ { ++ g_spawn_command_line_sync("xlock -mode blank", ++ NULL, ++ NULL, ++ &exit_status, ++ NULL); ++ } ++ else ++ { ++ return FALSE; ++ } ++ ++ g_free(dummy); ++ ++ if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ + /* Verify that a program is running and that an executable is available. */ + static gboolean verify_running(char * display_manager, char * executable) + { +@@ -187,6 +235,8 @@ + /* Handler for "clicked" signal on Suspend button. */ + static void suspend_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->suspend_DeviceKit) + dbus_DeviceKit_Suspend(); + else if (handler_context->suspend_HAL) +@@ -197,6 +247,8 @@ + /* Handler for "clicked" signal on Hibernate button. */ + static void hibernate_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->hibernate_DeviceKit) + dbus_DeviceKit_Hibernate(); + else if (handler_context->hibernate_HAL) +@@ -207,6 +259,8 @@ + /* Handler for "clicked" signal on Switch User button. */ + static void switch_user_clicked(GtkButton * button, HandlerContext * handler_context) + { ++ lock_screen(); ++ + if (handler_context->switch_user_GDM) + g_spawn_command_line_sync("gdmflexiserver --startnew", NULL, NULL, NULL, NULL); + else if (handler_context->switch_user_KDM) diff --git a/lxsession.changes b/lxsession.changes index 02dc9a8..6471bff 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 14 08:44:53 UTC 2010 - andrea@opensuse.org + +- spec file clean up + ------------------------------------------------------------------- Tue Jul 13 22:12:42 UTC 2010 - guido+opensuse.org@berhoerster.name diff --git a/lxsession.spec b/lxsession.spec index a7dee67..c8c346f 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -26,9 +26,9 @@ Group: System/GUI/LXDE License: GPL Url: http://www.lxde.org/ Source0: %{name}-%{version}.tar.bz2 -# PATCH-FIX-UPSTREAM lxsession-0.4.4-lock-screen.patch bnc# guido+opensuse.org@berhoerster.name -# lxsession-logout should lock the screen before suspending/hibernating/switching users, this fixes bnc#622083 -Patch0: %{name}-0.4.4-lock-screen.patch +# PATCH-FIX-UPSTREAM lxsession-0.4.4-lock-screen-bnc622083.patch bnc#622083 guido+opensuse.org@berhoerster.name +# lxsession-logout should lock the screen before suspending/hibernating/switching users +Patch0: %name-0.4.4-lock-screen-bnc622083.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt From 390562b73c0a8f634322f5e7eeee35dc46025c5f07ccb826c64444602f548b81 Mon Sep 17 00:00:00 2001 From: andrea florio Date: Sat, 17 Jul 2010 08:24:31 +0000 Subject: [PATCH 6/8] - added lxsession-0.4.4-fix-bnc623192.patch to fix upstream bug sf#3030576 (bnc#623192) OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=31 --- lxsession-0.4.4-fix-bnc623192.patch | 24 ++++++++++++++++++++++++ lxsession.changes | 6 ++++++ lxsession.spec | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 lxsession-0.4.4-fix-bnc623192.patch diff --git a/lxsession-0.4.4-fix-bnc623192.patch b/lxsession-0.4.4-fix-bnc623192.patch new file mode 100644 index 0000000..e726a19 --- /dev/null +++ b/lxsession-0.4.4-fix-bnc623192.patch @@ -0,0 +1,24 @@ +From b87979e4dfe4279be4f96f7e010ea4c8557f50a6 Mon Sep 17 00:00:00 2001 +From: Marty Jack +Date: Fri, 16 Jul 2010 16:46:58 -0400 +Subject: [PATCH] Soften from g_error to fprintf(stderr) to quiet abrt (Bug3030576) + +--- + lxsession/lxsession.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lxsession/lxsession.c b/lxsession/lxsession.c +index 17e3ff7..026a30b 100644 +--- a/lxsession/lxsession.c ++++ b/lxsession/lxsession.c +@@ -289,7 +289,7 @@ int main(int argc, char** argv) + else if( G_UNLIKELY( !single_instance_check()) ) + { + /* only one instance is allowed for each X. */ +- g_error( "Only one lxsession can be executed at a time." ); ++ fprintf(stderr, "Only one lxsession can be executed at a time"); + return 1; + } + +-- +1.6.3 diff --git a/lxsession.changes b/lxsession.changes index 6471bff..47627b6 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jul 17 08:21:07 UTC 2010 - andrea@opensuse.org + +- added lxsession-0.4.4-fix-bnc623192.patch to fix upstream + bug sf#3030576 (bnc#623192) + ------------------------------------------------------------------- Wed Jul 14 08:44:53 UTC 2010 - andrea@opensuse.org diff --git a/lxsession.spec b/lxsession.spec index c8c346f..69fc450 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -29,6 +29,9 @@ Source0: %{name}-%{version}.tar.bz2 # PATCH-FIX-UPSTREAM lxsession-0.4.4-lock-screen-bnc622083.patch bnc#622083 guido+opensuse.org@berhoerster.name # lxsession-logout should lock the screen before suspending/hibernating/switching users Patch0: %name-0.4.4-lock-screen-bnc622083.patch +# PATCH-FIX-UPSTREAM lxsession-0.4.4-fix-bnc623192.patch bnc#623192 andrea@opensuse.org +# lxsession crasch with signal 6 (SIGABRT) +Patch1: %name-0.4.4-fix-bnc623192.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt @@ -46,6 +49,7 @@ Authors: %prep %setup -q -n %name-%version %patch0 -p1 +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" From 4d55b888910d51b5de1d048a4b2492a2b9cdd1192f707965484b5c65b95b7700 Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 17 Jul 2010 11:04:41 +0000 Subject: [PATCH 7/8] Accepting request 43147 from home:gberh:branches:X11:lxde Copy from home:gberh:branches:X11:lxde/lxsession via accept of submit request 43147 revision 2. Request was accepted with message: OK OBS-URL: https://build.opensuse.org/request/show/43147 OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=32 --- lxsession-0.4.4-lock-screen-bnc622083.patch | 65 +++++++++------------ lxsession.changes | 5 ++ 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/lxsession-0.4.4-lock-screen-bnc622083.patch b/lxsession-0.4.4-lock-screen-bnc622083.patch index c60b93d..7c74368 100644 --- a/lxsession-0.4.4-lock-screen-bnc622083.patch +++ b/lxsession-0.4.4-lock-screen-bnc622083.patch @@ -1,6 +1,6 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4.4/lxsession-logout/lxsession-logout.c --- lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c 2010-03-31 18:28:50.000000000 +0200 -+++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-14 00:10:28.000000000 +0200 ++++ lxsession-0.4.4/lxsession-logout/lxsession-logout.c 2010-07-17 11:23:57.000000000 +0200 @@ -25,6 +25,7 @@ #include #include @@ -17,7 +17,7 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4 static gboolean verify_running(char * display_manager, char * executable); static void logout_clicked(GtkButton * button, HandlerContext * handler_context); static void shutdown_clicked(GtkButton * button, HandlerContext * handler_context); -@@ -83,6 +85,52 @@ +@@ -83,6 +85,46 @@ static GtkPositionType get_banner_position(void); static GdkPixbuf * get_background_pixbuf(void); @@ -26,43 +26,37 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4 + */ +static gboolean lock_screen(void) +{ -+ gchar *dummy; ++ gint i; ++ gint argcp; ++ gchar **argvp; + gint exit_status; ++ gchar *locking_commands[] = { ++ "xscreensaver-command -lock", ++ "gnome-screensaver-command --lock", ++ "xlock -mode blank", ++ NULL ++ }; + -+ if ((dummy = g_find_program_in_path("xscreensaver-command")) != NULL) ++ for (i = 0; locking_commands[i] != NULL; ++i) + { -+ g_spawn_command_line_sync("xscreensaver-command -lock", ++ g_shell_parse_argv(locking_commands[i], &argcp, &argvp, NULL); ++ g_spawn_sync(NULL, ++ argvp, ++ NULL, ++ G_SPAWN_SEARCH_PATH|G_SPAWN_STDOUT_TO_DEV_NULL|G_SPAWN_STDERR_TO_DEV_NULL, ++ NULL, ++ NULL, + NULL, + NULL, + &exit_status, + NULL); -+ } -+ else if ((dummy = g_find_program_in_path("gnome-screensaver-command")) != -+ NULL) -+ { -+ g_spawn_command_line_sync("gnome-screensaver-command --lock", -+ NULL, -+ NULL, -+ &exit_status, -+ NULL); -+ } -+ else if ((dummy = g_find_program_in_path("xlock")) != NULL) -+ { -+ g_spawn_command_line_sync("xlock -mode blank", -+ NULL, -+ NULL, -+ &exit_status, -+ NULL); -+ } -+ else -+ { -+ return FALSE; -+ } ++ g_strfreev (argvp); + -+ g_free(dummy); -+ -+ if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 0) -+ return TRUE; ++ if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 0) ++ { ++ return TRUE; ++ } ++ } + + return FALSE; +} @@ -70,30 +64,27 @@ diff -urN lxsession-0.4.4.orig/lxsession-logout/lxsession-logout.c lxsession-0.4 /* Verify that a program is running and that an executable is available. */ static gboolean verify_running(char * display_manager, char * executable) { -@@ -187,6 +235,8 @@ +@@ -187,6 +229,7 @@ /* Handler for "clicked" signal on Suspend button. */ static void suspend_clicked(GtkButton * button, HandlerContext * handler_context) { + lock_screen(); -+ if (handler_context->suspend_DeviceKit) dbus_DeviceKit_Suspend(); else if (handler_context->suspend_HAL) -@@ -197,6 +247,8 @@ +@@ -197,6 +240,7 @@ /* Handler for "clicked" signal on Hibernate button. */ static void hibernate_clicked(GtkButton * button, HandlerContext * handler_context) { + lock_screen(); -+ if (handler_context->hibernate_DeviceKit) dbus_DeviceKit_Hibernate(); else if (handler_context->hibernate_HAL) -@@ -207,6 +259,8 @@ +@@ -207,6 +251,7 @@ /* Handler for "clicked" signal on Switch User button. */ static void switch_user_clicked(GtkButton * button, HandlerContext * handler_context) { + lock_screen(); -+ if (handler_context->switch_user_GDM) g_spawn_command_line_sync("gdmflexiserver --startnew", NULL, NULL, NULL, NULL); else if (handler_context->switch_user_KDM) diff --git a/lxsession.changes b/lxsession.changes index 47627b6..b1d2099 100644 --- a/lxsession.changes +++ b/lxsession.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 17 09:51:25 UTC 2010 - guido+opensuse.org@berhoerster.name + +- refine patch for bnc#622083 + ------------------------------------------------------------------- Sat Jul 17 08:21:07 UTC 2010 - andrea@opensuse.org From 0b9c3177026b2d27767ebe1fad40fe309ad923873238dc6e37eee828bed64dc8 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 19 Jul 2010 18:26:07 +0000 Subject: [PATCH 8/8] Accepting request 43169 from X11:lxde checked in (request 43169) OBS-URL: https://build.opensuse.org/request/show/43169 OBS-URL: https://build.opensuse.org/package/show/X11:lxde/lxsession?expand=0&rev=33 --- lxsession.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxsession.spec b/lxsession.spec index 69fc450..9e5ba5d 100644 --- a/lxsession.spec +++ b/lxsession.spec @@ -20,7 +20,7 @@ Name: lxsession Version: 0.4.4 -Release: 2 +Release: 3 Summary: LXDE Session Manager, required for running the desktop environment Group: System/GUI/LXDE License: GPL @@ -31,7 +31,7 @@ Source0: %{name}-%{version}.tar.bz2 Patch0: %name-0.4.4-lock-screen-bnc622083.patch # PATCH-FIX-UPSTREAM lxsession-0.4.4-fix-bnc623192.patch bnc#623192 andrea@opensuse.org # lxsession crasch with signal 6 (SIGABRT) -Patch1: %name-0.4.4-fix-bnc623192.patch +Patch1: %name-0.4.4-fix-bnc623192.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: dbus-1-glib-devel fdupes gtk2-devel intltool pkg-config BuildRequires: docbook-utils docbook-xsl-stylesheets hal-devel libxslt