[gdm] ConsoleKit: a pair of tweaks
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] ConsoleKit: a pair of tweaks
- Date: Wed, 26 Mar 2014 13:48:38 +0000 (UTC)
commit 1d76114a001c5c4eeba17fc9a455e3a132fc23c5
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Mar 26 00:33:58 2014 -0400
ConsoleKit: a pair of tweaks
It looks like there were a couple of breaks when porting away from
ck-connector.
The first issue is that consolekit uses some hard-coded rules to decide
if a given session is associated with the hard-coded 'Seat1' or not.
One of these rules is the "x11-display-device" property being set. We
were setting the "display-device" property instead, which is not for
graphical sessions. This was causing a new seat to be dynamically
created each time gdm started which was causing us to send
ActivateSession requests to the wrong seat.
The second issue is that ActivateSession will "fail" with "Session
already active" errors. Ignore those.
https://bugzilla.gnome.org/show_bug.cgi?id=727072
daemon/gdm-manager.c | 9 ++++++++-
daemon/gdm-session-worker.c | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index c5e46b6..2fc2ae5 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -430,7 +430,14 @@ activate_session_id_for_ck (GdmManager *manager,
g_debug ("GdmManager: ConsoleKit %s raised:\n %s\n\n",
g_dbus_error_get_remote_error (error), error->message);
g_error_free (error);
- return FALSE;
+
+ /* It is very likely that the "error" just reported is
+ * that the session is already active. Unfortunately,
+ * ConsoleKit doesn't use proper error codes and it
+ * translates the error message, so we have no real way
+ * to detect this case...
+ */
+ return TRUE;
}
g_variant_unref (reply);
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 39f14cf..a0cbfb5 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -274,7 +274,7 @@ open_ck_session (GdmSessionWorker *worker)
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(sv)"));
g_variant_builder_add_parsed (&builder, "('unix-user', <%i>)", uid);
- g_variant_builder_add_parsed (&builder, "('display-device', <%s>)", display_device);
+ g_variant_builder_add_parsed (&builder, "('x11-display-device', <%s>)", display_device);
g_variant_builder_add_parsed (&builder, "('x11-display', <%s>)", display_name);
g_variant_builder_add_parsed (&builder, "('remote-host-name', <%s>)", display_hostname);
g_variant_builder_add_parsed (&builder, "('is-local', <%b>)", worker->priv->display_is_local);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]