[mate-screensaver] use gdm as last condition for user switching

Wolfgang Ulbrich raveit65 at fedoraproject.org
Fri Feb 20 14:52:26 UTC 2015


commit 1ccec54dd852c91bf963549597c542ad12812b68
Author: raveit65 <chat-to-me at raveit.de>
Date:   Fri Feb 20 15:52:15 2015 +0100

    use gdm as last condition for user switching

 mate-screensaver.spec                              |  9 +++-
 ...use-gdm-as-last-condition-for-user-switch.patch | 55 ++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
---
diff --git a/mate-screensaver.spec b/mate-screensaver.spec
index f428bec..f7fefce 100644
--- a/mate-screensaver.spec
+++ b/mate-screensaver.spec
@@ -14,7 +14,7 @@
 
 Name:           mate-screensaver
 Version:        %{branch}.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 #Release:        0.1%{?git_rel}%{?dist}
 Summary:        MATE Screensaver
 License:        GPLv2+ and LGPLv2+
@@ -26,6 +26,9 @@ URL:            http://pub.mate-desktop.org
 # Source for snapshot-builds.
 %{!?rel_build:Source0:    http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=1194518
+Patch0:         mate-screensaver_use-gdm-as-last-condition-for-user-switch.patch
+
 Requires:       redhat-menus
 Requires:       system-logos
 
@@ -72,6 +75,7 @@ Development files for mate-screensaver
 
 %prep
 %setup -q%{!?rel_build:n %{name}-%{commit}}
+%patch0 -p1 -b .gdm
 
 # needed for git snapshots
 #NOCONFIGURE=1 ./autogen.sh
@@ -148,6 +152,9 @@ fi
 
 
 %changelog
+* Sat Feb 20 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.9.2-2
+- use gdm as last condition for user switching
+
 * Wed Jan 20 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.9.2-1
 - update to 1.9.2 release
 
diff --git a/mate-screensaver_use-gdm-as-last-condition-for-user-switch.patch b/mate-screensaver_use-gdm-as-last-condition-for-user-switch.patch
new file mode 100644
index 0000000..ceb5bfa
--- /dev/null
+++ b/mate-screensaver_use-gdm-as-last-condition-for-user-switch.patch
@@ -0,0 +1,55 @@
+diff -upr mate-screensaver-1.8.1-orig/src/gs-lock-plug.c mate-screensaver-1.8.1/src/gs-lock-plug.c
+--- mate-screensaver-1.8.1-orig/src/gs-lock-plug.c	2014-09-25 14:46:12.000000000 +0200
++++ mate-screensaver-1.8.1/src/gs-lock-plug.c	2015-02-20 15:33:36.888982325 +0100
+@@ -229,25 +229,6 @@ do_user_switch (GSLockPlug *plug)
+ 			g_error_free (error);
+ 		}
+ 	}
+-	else if (is_program_in_path (GDM_FLEXISERVER_COMMAND))
+-	{
+-		/* GDM */
+-		command = g_strdup_printf ("%s %s",
+-								   GDM_FLEXISERVER_COMMAND,
+-								   GDM_FLEXISERVER_ARGS);
+-
+-		error = NULL;
+-		res = gdk_spawn_command_line_on_screen (gdk_screen_get_default (),
+-												command,
+-												&error);
+-
+-		g_free (command);
+-		
+-		if (! res) {
+-			gs_debug ("Unable to start GDM greeter: %s", error->message);
+-			g_error_free (error);
+-		}
+-	}
+ 	else if (g_getenv ("XDG_SEAT_PATH") != NULL)
+ 	{
+ 		/* LightDM */
+@@ -278,7 +259,25 @@ do_user_switch (GSLockPlug *plug)
+ 			g_error_free (error);
+ 		}
+ 	}
++	else if (is_program_in_path (GDM_FLEXISERVER_COMMAND))
++	{
++		/* GDM */
++		command = g_strdup_printf ("%s %s",
++								   GDM_FLEXISERVER_COMMAND,
++								   GDM_FLEXISERVER_ARGS);
++
++		error = NULL;
++		res = gdk_spawn_command_line_on_screen (gdk_screen_get_default (),
++												command,
++												&error);
+ 
++		g_free (command);
++		
++		if (! res) {
++			gs_debug ("Unable to start GDM greeter: %s", error->message);
++			g_error_free (error);
++		}
++	}
+ }
+ 
+ static void


More information about the scm-commits mailing list