Blob Blame History Raw
From e4c9a998f89d429d31b02997f146c8218c0742bc Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 24 Sep 2018 14:45:38 -0400
Subject: [PATCH 34/51] manager: don't run autologin display on tty1

tty1 is really meant for the login screen.
If a user autologins on it and we need a login
screen later, then the login screen has to go
in some auxiliary VT which isn't very nice.

This commit changes autologin to not use the
initial vt.
---
 daemon/gdm-manager.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 4c81dac7f..e896c8945 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1308,74 +1308,72 @@ get_automatic_login_details (GdmManager *manager,
         } else {
                 g_free (username);
         }
 
         return enabled;
 }
 
 static const char *
 get_username_for_greeter_display (GdmManager *manager,
                                   GdmDisplay *display)
 {
         gboolean doing_initial_setup = FALSE;
 
         g_object_get (G_OBJECT (display),
                       "doing-initial-setup", &doing_initial_setup,
                       NULL);
 
         if (doing_initial_setup) {
                 return INITIAL_SETUP_USERNAME;
         } else {
                 return GDM_USERNAME;
         }
 }
 
 static void
 set_up_automatic_login_session (GdmManager *manager,
                                 GdmDisplay *display)
 {
         GdmSession *session;
         char       *display_session_type = NULL;
-        gboolean is_initial;
 
         /* 0 is root user; since the daemon talks to the session object
          * directly, itself, for automatic login
          */
         session = create_user_session_for_display (manager, display, 0);
 
         g_object_get (G_OBJECT (display),
-                      "is-initial", &is_initial,
                       "session-type", &display_session_type,
                       NULL);
 
         g_object_set (G_OBJECT (session),
-                      "display-is-initial", is_initial,
+                      "display-is-initial", FALSE,
                       NULL);
 
         g_debug ("GdmManager: Starting automatic login conversation");
         gdm_session_start_conversation (session, "gdm-autologin");
 }
 
 static void
 set_up_chooser_session (GdmManager *manager,
                         GdmDisplay *display)
 {
         const char *allowed_user;
         struct passwd *passwd_entry;
 
         allowed_user = get_username_for_greeter_display (manager, display);
 
         if (!gdm_get_pwent_for_name (allowed_user, &passwd_entry)) {
                 g_warning ("GdmManager: couldn't look up username %s",
                            allowed_user);
                 gdm_display_unmanage (display);
                 gdm_display_finish (display);
                 return;
         }
 
         gdm_display_start_greeter_session (display);
 }
 
 static void
 set_up_greeter_session (GdmManager *manager,
                         GdmDisplay *display)
 {
-- 
2.27.0