diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-03-26 00:33:58 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2014-03-26 09:48:23 -0400 |
commit | 1d76114a001c5c4eeba17fc9a455e3a132fc23c5 (patch) | |
tree | bf1dc7c4c7afbe0ba22e79aaca1255e9fbcff717 | |
parent | 068ac072d9b5e907c7e85d4665c5a5f61692990b (diff) | |
download | gdm-1d76114a001c5c4eeba17fc9a455e3a132fc23c5.tar.gz |
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
-rw-r--r-- | daemon/gdm-manager.c | 9 | ||||
-rw-r--r-- | 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 c5e46b6c..2fc2ae55 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 39f14cf0..a0cbfb51 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); |