From bf5502df3e1d12a7a28ced86752c94baf509dbe0 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 23 Mar 2022 16:08:31 +0000 Subject: [PATCH] Tell libhandy not to use Settings portal By default, libhandy reads settings from the Settings portal, which causes the portal to be started, which causes gnome-keyring to be started. This interferes with our attempt to manually start gnome-keyring and set the login keyring password to a well-known value, which we overwrite with the user's password once they choose one. To avoid this problem, set an environment variable to tell libhandy not to use the portal. Fixes: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/141 --- gnome-initial-setup/gnome-initial-setup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c index 245a1334..fe9a88db 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c @@ -276,6 +276,14 @@ main (int argc, char *argv[]) g_unsetenv ("GIO_USE_VFS"); + /* By default, libhandy reads settings from the Settings portal, which causes + * the portal to be started, which causes gnome-keyring to be started. This + * interferes with our attempt below to manually start gnome-keyring and set + * the login keyring password to a well-known value, which we overwrite with + * the user's password once they choose one. + */ + g_setenv ("HDY_DISABLE_PORTAL", "1", /* overwrite */ TRUE); + context = g_option_context_new (_("— GNOME initial setup")); g_option_context_add_main_entries (context, entries, NULL); -- GitLab