Blob Blame History Raw
From 763e31a576a4cd665e5ad06ad0eb4610cecc0b42 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 10 Jul 2020 10:45:52 -0400
Subject: [PATCH 46/51] gdm-x-session: tell x server to not vt switch

gdm already handles the VT switching on X's behalf,
so it's redundant, and X does it at inopportune times,
so instruct it to not get involved.
---
 daemon/gdm-x-session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index 3b2fcef47..d8e3c7d53 100644
--- a/daemon/gdm-x-session.c
+++ b/daemon/gdm-x-session.c
@@ -247,60 +247,61 @@ spawn_x_server (State        *state,
         }
 
         g_ptr_array_add (arguments, "-displayfd");
         g_ptr_array_add (arguments, display_fd_string);
 
         g_ptr_array_add (arguments, "-auth");
         g_ptr_array_add (arguments, auth_file);
 
         /* If we were compiled with Xserver >= 1.17 we need to specify
          * '-listen tcp' as the X server dosen't listen on tcp sockets
          * by default anymore. In older versions we need to pass
          * -nolisten tcp to disable listening on tcp sockets.
          */
 #ifdef HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY
         if (allow_remote_connections) {
                 g_ptr_array_add (arguments, "-listen");
                 g_ptr_array_add (arguments, "tcp");
         }
 #else
         if (!allow_remote_connections) {
                 g_ptr_array_add (arguments, "-nolisten");
                 g_ptr_array_add (arguments, "tcp");
         }
 #endif
 
         g_ptr_array_add (arguments, "-background");
         g_ptr_array_add (arguments, "none");
 
         g_ptr_array_add (arguments, "-noreset");
         g_ptr_array_add (arguments, "-keeptty");
+        g_ptr_array_add (arguments, "-novtswitch");
 
         g_ptr_array_add (arguments, "-verbose");
         if (state->debug_enabled) {
                 g_ptr_array_add (arguments, "7");
         } else {
                 g_ptr_array_add (arguments, "3");
         }
 
         if (state->debug_enabled) {
                 g_ptr_array_add (arguments, "-core");
         }
         g_ptr_array_add (arguments, NULL);
 
         subprocess = g_subprocess_launcher_spawnv (launcher,
                                                    (const char * const *) arguments->pdata,
                                                    &error);
         g_free (display_fd_string);
         g_clear_object (&launcher);
         g_ptr_array_free (arguments, TRUE);
 
         if (subprocess == NULL) {
                 g_debug ("could not start X server: %s", error->message);
                 goto out;
         }
 
         input_stream = g_unix_input_stream_new (pipe_fds[0], TRUE);
         data_stream = g_data_input_stream_new (input_stream);
         g_clear_object (&input_stream);
 
         display_number = g_data_input_stream_read_line (data_stream,
-- 
2.27.0