[gnome-initial-setup/120-disable-existing-user-mode] Disable existing-user mode




commit 0ee330582b9bd896ac0da93a0baaa9a7153e8757
Author: Will Thompson <wjt endlessos org>
Date:   Fri Feb 12 13:54:04 2021 +0000

    Disable existing-user mode
    
    Prior to GNOME 40, GNOME Tour was launched at the end of Initial Setup's
    existing-user mode. In GNOME 40, Shell displays a dialog offering to run
    the tour (for existing users which have not logged in, and users
    upgrading to 40). If we also run Initial Setup for existing users who
    have not previously logged in, they would then end up with Tour on top
    of Initial Setup, which would not be a good look.
    
    Ideally, we would like to always run Initial Setup in the "kiosk" mode
    that is used when no users exist. (The lack of this means that, for
    example, the language-selection page doesn't actually work until the
    user restarts their session.) This would also avoid the collision with
    Tour. Until we have this, disable existing-user mode.
    
    One option would have been to remove the xdg-autostart and systemd units
    for this mode. The downside of doing that would be that the
    .config/gnome-initial-setup-done file would not be written, so if we
    reinstate this mode in a future release, we wouldn't be able to
    distinguish "user has never logged in" from "user has logged in, but
    with a GNOME version that didn't do existing-user mode Initial Setup".
    
    (This is equivalent to a patch that Endless OS has carried for years.)
    
    See: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/120#note_1019004>
    See: <https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/12>

 gnome-initial-setup/gnome-initial-setup.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 0ab987af..d6ecb109 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -308,6 +308,20 @@ main (int argc, char *argv[])
 
   driver = gis_driver_new (mode);
 
+  /* On first login, GNOME Shell offers to run a tour. If we also run Initial
+   * Setup, the two immovable, centred windows will sit atop one another.
+   * Until we have the ability to run Initial Setup in the "kiosk" mode, like
+   * it does in new-user mode, disable Initial Setup for existing users.
+   *
+   * https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/120#note_1019004
+   * https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/12
+   */
+  if (mode == GIS_DRIVER_MODE_EXISTING_USER) {
+    g_message ("Skipping gnome-initial-setup for existing user");
+    gis_ensure_stamp_files (driver);
+    exit (EXIT_SUCCESS);
+  }
+
   /* We only do this in existing-user mode, because if gdm launches us
    * in new-user mode and we just exit, gdm's special g-i-s session
    * never terminates. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]