raveit65 pushed to mate-session-manager (epel7). "fix user switching if more than 2 desktop managers are installed"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Apr 1 20:34:37 UTC 2015
>From 430b8168d693747115919eea96cc6b0d49086bf8 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Sat, 7 Jun 2014 03:09:37 -0500
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/mate-session-manager.spec b/mate-session-manager.spec
index c6584f3..87e09a6 100644
--- a/mate-session-manager.spec
+++ b/mate-session-manager.spec
@@ -1,6 +1,6 @@
Name: mate-session-manager
Version: 1.8.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MATE Desktop session manager
License: GPLv2+
URL: http://mate-desktop.org
@@ -93,6 +93,9 @@ fi
%changelog
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.1-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
* Sun Mar 16 2014 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.1-1
- update to 1.8.1 release
--
cgit v0.10.2
>From adebaeccce3dd0790c7b75fc0b3ac1bd93d19ffe Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson at fedoraproject.org>
Date: Sun, 17 Aug 2014 08:52:39 +0000
Subject: - Rebuilt for
https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/mate-session-manager.spec b/mate-session-manager.spec
index 87e09a6..efd1dd4 100644
--- a/mate-session-manager.spec
+++ b/mate-session-manager.spec
@@ -1,6 +1,6 @@
Name: mate-session-manager
Version: 1.8.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: MATE Desktop session manager
License: GPLv2+
URL: http://mate-desktop.org
@@ -93,6 +93,9 @@ fi
%changelog
+* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
--
cgit v0.10.2
>From 6165134425827df6c3de358123e171c58013c398 Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me at raveit.de>
Date: Wed, 11 Mar 2015 16:02:46 +0100
Subject: add a upstream patch
diff --git a/mate-session-manager_avoid-dereferencing-NULL-pointer.patch b/mate-session-manager_avoid-dereferencing-NULL-pointer.patch
new file mode 100644
index 0000000..58a1da7
--- /dev/null
+++ b/mate-session-manager_avoid-dereferencing-NULL-pointer.patch
@@ -0,0 +1,33 @@
+diff --git a/mate-session/main.c b/mate-session/main.c
+index 63cc5fc..f5f5734 100644
+--- a/mate-session/main.c
++++ b/mate-session/main.c
+@@ -249,15 +249,16 @@ static void append_required_apps(GsmManager* manager)
+ {
+ g_warning("No required applications specified");
+ }
+-
+- for (i = 0; required_components[i]; i++)
++ else
+ {
++ for (i = 0; required_components[i]; i++)
++ {
+ char* default_provider;
+ const char* component;
+
+ if (IS_STRING_EMPTY((char*) required_components[i]))
+ {
+- continue;
++ continue;
+ }
+
+ component = required_components[i];
+@@ -285,6 +286,7 @@ static void append_required_apps(GsmManager* manager)
+ }
+
+ g_free(default_provider);
++ }
+ }
+
+ g_debug("main: *** Done adding required apps");
+
diff --git a/x-caja.patch b/x-caja.patch
deleted file mode 100644
index 64d6bbc..0000000
--- a/x-caja.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff --git a/data/org.mate.session.gschema.xml.in.in b/data/org.mate.session.gschema.xml.in.in
-index a40ca2a..2415c67 100644
---- a/data/org.mate.session.gschema.xml.in.in
-+++ b/data/org.mate.session.gschema.xml.in.in
-@@ -1,5 +1,10 @@
- <schemalist>
- <schema id="org.mate.session" path="/org/mate/desktop/session/">
-+ <key name="session-start" type="i">
-+ <default>0</default>
-+ <_summary>Current session start time</_summary>
-+ <_description>Unix time of the start of the current session.</_description>
-+ </key>
- <key name="auto-save-session" type="b">
- <default>false</default>
- <_summary>Save sessions</_summary>
-diff --git a/mate-session/main.c b/mate-session/main.c
-index da2a687..4dd8fd1 100644
---- a/mate-session/main.c
-+++ b/mate-session/main.c
-@@ -27,6 +27,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <errno.h>
-+#include <time.h>
-
- #include <glib/gi18n.h>
- #include <glib.h>
-@@ -67,6 +68,27 @@ static gboolean failsafe = FALSE;
- static gboolean show_version = FALSE;
- static gboolean debug = FALSE;
-
-+static gboolean
-+initialize_gsettings (void)
-+{
-+ GSettings* settings;
-+ time_t now = time (0);
-+ gboolean ret;
-+
-+ settings = g_settings_new (GSM_SCHEMA);
-+
-+ if (!settings)
-+ return FALSE;
-+
-+ ret = g_settings_set_int (settings, "session-start", now);
-+
-+ g_settings_sync ();
-+
-+ g_object_unref (settings);
-+
-+ return ret;
-+}
-+
- static void on_bus_name_lost(DBusGProxy* bus_proxy, const char* name, gpointer data)
- {
- g_warning("Lost name on bus: %s, exiting", name);
-@@ -505,6 +527,13 @@ int main(int argc, char** argv)
- */
- gsm_util_setenv("MATE_DESKTOP_SESSION_ID", "this-is-deprecated");
-
-+ /*
-+ * Make sure gsettings is set up correctly. If not, then bail.
-+ */
-+
-+ if (initialize_gsettings () != TRUE)
-+ exit (1);
-+
- client_store = gsm_store_new();
-
- xsmp_server = gsm_xsmp_server_new(client_store);
--
cgit v0.10.2
>From ebc75e98d248ecc79e5232d215bf8c7a33e344e1 Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me at raveit.de>
Date: Wed, 11 Mar 2015 16:06:19 +0100
Subject: update to 1.8.2 release
diff --git a/.gitignore b/.gitignore
index 74ce35a..969a721 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/mate-session-manager-1.7.90.tar.xz
/mate-session-manager-1.8.0.tar.xz
/mate-session-manager-1.8.1.tar.xz
+/mate-session-manager-1.8.2.tar.xz
diff --git a/mate-session-manager.spec b/mate-session-manager.spec
index efd1dd4..bf3c29c 100644
--- a/mate-session-manager.spec
+++ b/mate-session-manager.spec
@@ -1,11 +1,15 @@
Name: mate-session-manager
-Version: 1.8.1
-Release: 3%{?dist}
+Version: 1.8.2
+Release: 1%{?dist}
Summary: MATE Desktop session manager
License: GPLv2+
URL: http://mate-desktop.org
Source0: http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778817
+# https://github.com/mate-desktop/mate-session-manager/pull/71
+Patch0: mate-session-manager_avoid-dereferencing-NULL-pointer.patch
+
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel
@@ -34,6 +38,7 @@ full-featured user session.
%prep
%setup -q
+%patch0 -p1 -b .NULL-pointer
%build
%configure \
@@ -93,6 +98,10 @@ fi
%changelog
+* Wed Mar 11 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2.1
+- update to 1.8.2 release
+- add upstream patch from pull request
+
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
diff --git a/sources b/sources
index ef3ecd5..1cfa272 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b19b9e585f7343e34bff9b58c4f1d963 mate-session-manager-1.8.1.tar.xz
+1e1f85e411cbe70e81a771a2d65664d4 mate-session-manager-1.8.2.tar.xz
--
cgit v0.10.2
>From 0b9f51c08417c59b465f4fa7ac609cc69a52ed25 Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me at raveit.de>
Date: Wed, 1 Apr 2015 22:27:51 +0200
Subject: fix user switching if more than 2 desktop managers are installed
diff --git a/mate-session-manager.spec b/mate-session-manager.spec
index bf3c29c..61c96ea 100644
--- a/mate-session-manager.spec
+++ b/mate-session-manager.spec
@@ -1,6 +1,6 @@
Name: mate-session-manager
Version: 1.8.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MATE Desktop session manager
License: GPLv2+
URL: http://mate-desktop.org
@@ -9,6 +9,7 @@ Source0: http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778817
# https://github.com/mate-desktop/mate-session-manager/pull/71
Patch0: mate-session-manager_avoid-dereferencing-NULL-pointer.patch
+Patch1: mate-session-manager_1.8-ckeck-for-running-DM-for-user-switching.patch
BuildRequires: dbus-glib-devel
BuildRequires: desktop-file-utils
@@ -39,6 +40,7 @@ full-featured user session.
%prep
%setup -q
%patch0 -p1 -b .NULL-pointer
+%patch1 -p1 -b .user-switching
%build
%configure \
@@ -98,6 +100,9 @@ fi
%changelog
+* Wed Apr 01 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2-2
+- fix user switching if more than 2 desktop managers are installed
+
* Wed Mar 11 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2.1
- update to 1.8.2 release
- add upstream patch from pull request
diff --git a/mate-session-manager_1.8-ckeck-for-running-DM-for-user-switching.patch b/mate-session-manager_1.8-ckeck-for-running-DM-for-user-switching.patch
new file mode 100644
index 0000000..6af21b0
--- /dev/null
+++ b/mate-session-manager_1.8-ckeck-for-running-DM-for-user-switching.patch
@@ -0,0 +1,120 @@
+diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
+index eda565b..b7df6de 100644
+--- a/mate-session/gsm-manager.c
++++ b/mate-session/gsm-manager.c
+@@ -1013,18 +1013,21 @@ cancel_end_session (GsmManager *manager)
+ }
+
+ static gboolean
+-is_program_in_path (const char *program)
++process_is_running (const char * name)
+ {
+- char *tmp = g_find_program_in_path (program);
+- if (tmp != NULL)
+- {
+- g_free (tmp);
+- return TRUE;
+- }
+- else
+- {
+- return FALSE;
+- }
++ int num_processes;
++ char * command = g_strdup_printf ("pidof %s | wc -l", name);
++ FILE *fp = popen(command, "r");
++ fscanf(fp, "%d", &num_processes);
++ pclose(fp);
++ g_free (command);
++
++ if (num_processes > 0) {
++ return TRUE;
++ }
++ else {
++ return FALSE;
++ }
+ }
+
+ static void
+@@ -1033,8 +1036,9 @@ manager_switch_user (GsmManager *manager)
+ GError *error;
+ gboolean res;
+ char *command;
++ const gchar *xdg_seat_path = g_getenv ("XDG_SEAT_PATH");
+
+- if (is_program_in_path (MDM_FLEXISERVER_COMMAND)) {
++ if (process_is_running("mdm")) {
+ /* MDM */
+ command = g_strdup_printf ("%s %s",
+ MDM_FLEXISERVER_COMMAND,
+@@ -1056,7 +1060,7 @@ manager_switch_user (GsmManager *manager)
+ g_error_free (error);
+ }
+ }
+- else if (is_program_in_path (GDM_FLEXISERVER_COMMAND)) {
++ else if (process_is_running("gdm") || process_is_running("gdm3")) {
+ /* GDM */
+ command = g_strdup_printf ("%s %s",
+ GDM_FLEXISERVER_COMMAND,
+@@ -1078,36 +1082,33 @@ manager_switch_user (GsmManager *manager)
+ g_error_free (error);
+ }
+ }
+- else {
++ else if (xdg_seat_path != NULL) {
+ /* LightDM */
+- const gchar *xdg_seat_path = g_getenv ("XDG_SEAT_PATH");
+- if (xdg_seat_path != NULL) {
+- GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
+- GDBusProxy *proxy = NULL;
+- error = NULL;
++ GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START;
++ GDBusProxy *proxy = NULL;
++ error = NULL;
+
+- proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
+- flags,
+- NULL,
+- "org.freedesktop.DisplayManager",
+- xdg_seat_path,
+- "org.freedesktop.DisplayManager.Seat",
+- NULL,
+- &error);
+- if (proxy != NULL) {
+- g_dbus_proxy_call_sync (proxy,
+- "SwitchToGreeter",
+- g_variant_new ("()"),
+- G_DBUS_CALL_FLAGS_NONE,
+- -1,
+- NULL,
+- NULL);
+- g_object_unref (proxy);
+- }
+- else {
+- g_debug ("GsmManager: Unable to start LightDM greeter: %s", error->message);
+- g_error_free (error);
+- }
++ proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
++ flags,
++ NULL,
++ "org.freedesktop.DisplayManager",
++ xdg_seat_path,
++ "org.freedesktop.DisplayManager.Seat",
++ NULL,
++ &error);
++ if (proxy != NULL) {
++ g_dbus_proxy_call_sync (proxy,
++ "SwitchToGreeter",
++ g_variant_new ("()"),
++ G_DBUS_CALL_FLAGS_NONE,
++ -1,
++ NULL,
++ NULL);
++ g_object_unref (proxy);
++ }
++ else {
++ g_debug ("GsmManager: Unable to start LightDM greeter: %s", error->message);
++ g_error_free (error);
+ }
+ }
+ }
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/mate-session-manager.git/commit/?h=epel7&id=86e5a6d7f505beb5514163a7c9ceb778714f0c73
More information about the scm-commits
mailing list