[gdm/fix-jump-back-to-login-screen: 13/21] session: ensure login screen over XDMCP connects to its session
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/fix-jump-back-to-login-screen: 13/21] session: ensure login screen over XDMCP connects to its session
- Date: Tue, 22 Mar 2022 14:41:13 +0000 (UTC)
commit 432419b7f9e9ebe0cc72352cdeff8e19444cafe5
Author: Ray Strode <rstrode redhat com>
Date: Mon Feb 11 10:32:55 2019 -0500
session: ensure login screen over XDMCP connects to its session
Right now GTK preferentially picks the wayland display over an
X11 display if it finds one.
That causes a problem for XDMCP sessions, since there may be a
wayland display running on the local console for the GDM user.
This commit addresses the issue by forcing the X11 backend if
the session is X11.
daemon/gdm-session.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index f13b54afc..9f68166ee 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2766,6 +2766,25 @@ send_session_type (GdmSession *self,
session_type,
conversation->worker_cancellable,
NULL, NULL);
+
+ /* If the session type is x11, then set GDK_BACKEND to x11 as well.
+ * This is so gnome-session-check-accelerated from an XDMCP connection doesn't
+ * try to use the wayland display running on the local console for the gdm
+ * user login screen session.
+ *
+ * That's the only case where we let a user log in more than once, so it's
+ * the only situation that matters.
+ *
+ * We can drop this code if we ever switch the login screen to use systemd's
+ * DynamicUser feature.
+ */
+ if (g_strcmp0 (session_type, "x11") == 0) {
+ gdm_dbus_worker_call_set_environment_variable (conversation->worker_proxy,
+ "GDK_BACKEND",
+ "x11",
+ conversation->worker_cancellable,
+ NULL, NULL);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]