|
|
3b7e70 |
From 64e8db8432158e5115df18a03bb87ecc1d58ae63 Mon Sep 17 00:00:00 2001
|
|
|
890c66 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
890c66 |
Date: Mon, 11 Feb 2019 10:32:55 -0500
|
|
|
3b7e70 |
Subject: [PATCH 3/3] session: ensure login screen over XDMCP connects to its
|
|
|
890c66 |
session
|
|
|
890c66 |
|
|
|
890c66 |
Right now GTK preferentially picks the wayland display over an
|
|
|
890c66 |
X11 display if it finds one.
|
|
|
890c66 |
|
|
|
890c66 |
That causes a problem for XDMCP sessions, since there may be a
|
|
|
890c66 |
wayland display running on the local console for the GDM user.
|
|
|
890c66 |
|
|
|
890c66 |
This commit addresses the issue by forcing the X11 backend if
|
|
|
890c66 |
the session is X11.
|
|
|
890c66 |
---
|
|
|
890c66 |
daemon/gdm-session.c | 19 +++++++++++++++++++
|
|
|
890c66 |
1 file changed, 19 insertions(+)
|
|
|
890c66 |
|
|
|
890c66 |
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
|
|
|
3b7e70 |
index 77d6b8ff0..357e4a297 100644
|
|
|
890c66 |
--- a/daemon/gdm-session.c
|
|
|
890c66 |
+++ b/daemon/gdm-session.c
|
|
|
3b7e70 |
@@ -2697,60 +2697,79 @@ set_up_session_environment (GdmSession *self)
|
|
|
890c66 |
}
|
|
|
890c66 |
|
|
|
890c66 |
static void
|
|
|
890c66 |
send_display_mode (GdmSession *self,
|
|
|
890c66 |
GdmSessionConversation *conversation)
|
|
|
890c66 |
{
|
|
|
890c66 |
GdmSessionDisplayMode mode;
|
|
|
890c66 |
|
|
|
890c66 |
mode = gdm_session_get_display_mode (self);
|
|
|
890c66 |
gdm_dbus_worker_call_set_session_display_mode (conversation->worker_proxy,
|
|
|
890c66 |
gdm_session_display_mode_to_string (mode),
|
|
|
890c66 |
conversation->worker_cancellable,
|
|
|
890c66 |
NULL, NULL);
|
|
|
890c66 |
}
|
|
|
890c66 |
|
|
|
890c66 |
static void
|
|
|
890c66 |
send_session_type (GdmSession *self,
|
|
|
890c66 |
GdmSessionConversation *conversation)
|
|
|
890c66 |
{
|
|
|
890c66 |
const char *session_type = "x11";
|
|
|
890c66 |
|
|
|
3b7e70 |
if (self->session_type != NULL) {
|
|
|
3b7e70 |
session_type = self->session_type;
|
|
|
890c66 |
}
|
|
|
890c66 |
|
|
|
890c66 |
gdm_dbus_worker_call_set_environment_variable (conversation->worker_proxy,
|
|
|
890c66 |
"XDG_SESSION_TYPE",
|
|
|
890c66 |
session_type,
|
|
|
890c66 |
conversation->worker_cancellable,
|
|
|
890c66 |
NULL, NULL);
|
|
|
890c66 |
+
|
|
|
890c66 |
+ /* If the session type is x11, then set GDK_BACKEND to x11 as well.
|
|
|
890c66 |
+ * This is so gnome-session-check-accelerated from an XDMCP connection doesn't
|
|
|
890c66 |
+ * try to use the wayland display running on the local console for the gdm
|
|
|
890c66 |
+ * user login screen session.
|
|
|
890c66 |
+ *
|
|
|
890c66 |
+ * That's the only case where we let a user log in more than once, so it's
|
|
|
890c66 |
+ * the only situation that matters.
|
|
|
890c66 |
+ *
|
|
|
890c66 |
+ * We can drop this code if we ever switch the login screen to use systemd's
|
|
|
890c66 |
+ * DynamicUser feature.
|
|
|
890c66 |
+ */
|
|
|
890c66 |
+ if (g_strcmp0 (session_type, "x11") == 0) {
|
|
|
890c66 |
+ gdm_dbus_worker_call_set_environment_variable (conversation->worker_proxy,
|
|
|
890c66 |
+ "GDK_BACKEND",
|
|
|
890c66 |
+ "x11",
|
|
|
890c66 |
+ conversation->worker_cancellable,
|
|
|
890c66 |
+ NULL, NULL);
|
|
|
890c66 |
+ }
|
|
|
890c66 |
}
|
|
|
890c66 |
|
|
|
890c66 |
void
|
|
|
890c66 |
gdm_session_open_session (GdmSession *self,
|
|
|
890c66 |
const char *service_name)
|
|
|
890c66 |
{
|
|
|
890c66 |
GdmSessionConversation *conversation;
|
|
|
890c66 |
|
|
|
890c66 |
g_return_if_fail (GDM_IS_SESSION (self));
|
|
|
890c66 |
|
|
|
890c66 |
conversation = find_conversation_by_name (self, service_name);
|
|
|
890c66 |
|
|
|
890c66 |
if (conversation != NULL) {
|
|
|
890c66 |
send_display_mode (self, conversation);
|
|
|
890c66 |
send_session_type (self, conversation);
|
|
|
890c66 |
|
|
|
890c66 |
gdm_dbus_worker_call_open (conversation->worker_proxy,
|
|
|
890c66 |
conversation->worker_cancellable,
|
|
|
890c66 |
(GAsyncReadyCallback) on_opened, conversation);
|
|
|
890c66 |
}
|
|
|
890c66 |
}
|
|
|
890c66 |
|
|
|
890c66 |
static void
|
|
|
890c66 |
stop_all_other_conversations (GdmSession *self,
|
|
|
890c66 |
GdmSessionConversation *conversation_to_keep,
|
|
|
890c66 |
gboolean now)
|
|
|
890c66 |
{
|
|
|
890c66 |
GHashTableIter iter;
|
|
|
890c66 |
gpointer key, value;
|
|
|
890c66 |
|
|
|
890c66 |
--
|
|
|
3b7e70 |
2.30.1
|
|
|
890c66 |
|