File gdm-xvnc-start-session-failed.patch of Package gdm

From f984069418485191fb8fee16c9f202ac2b717e41 Mon Sep 17 00:00:00 2001
From: Joan Torres <joan.torres@suse.com>
Date: Fri, 1 Mar 2024 12:07:38 +0100
Subject: [PATCH] session: Reuse the VT when on XDMCP

XDMCP is running when session_type is not wayland and is not on any
seat_id.

Consider this to keep using DISPLAY_MODE_REUSE_VT on XDMCP (keep using the
same Xorg/Xvnc server), otherwise, the vncserver would be closed.
---
 daemon/gdm-session.c | 5 +++++
 1 file changed, 5 insertions(+)

Index: gdm-46.rc/daemon/gdm-session.c
===================================================================
--- gdm-46.rc.orig/daemon/gdm-session.c
+++ gdm-46.rc/daemon/gdm-session.c
@@ -3671,6 +3671,11 @@ gdm_session_get_display_mode (GdmSession
                 return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
         }
 
+        if (self->display_seat_id == NULL &&
+            g_strcmp0 (self->session_type, "wayland") != 0) {
+                return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
+        }
+
         if (g_strcmp0 (self->display_seat_id, "seat0") != 0) {
                 return GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED;
         }
openSUSE Build Service is sponsored by