From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#37831: GDM has a GNOME entry even when not installed Date: Sat, 11 Apr 2020 18:31:48 +0200 Message-ID: <87blnyrnkb.fsf@gnu.org> References: <87lftfd5wi.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51451) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNJ3B-0002ol-MP for bug-guix@gnu.org; Sat, 11 Apr 2020 12:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNJ34-0006Ei-M5 for bug-guix@gnu.org; Sat, 11 Apr 2020 12:32:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45487) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNJ34-0006ER-IA for bug-guix@gnu.org; Sat, 11 Apr 2020 12:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNJ34-0007ia-FU for bug-guix@gnu.org; Sat, 11 Apr 2020 12:32:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87lftfd5wi.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 20 Oct 2019 13:15:41 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 37831@debbugs.gnu.org Hi, Pierre Neidhardt skribis: > My config.scm installs EXWM + StumpWM, but not GNOME. > Before the last core-update, GDM would only suggest the 2 window > managers. > > After a recent Guix pull followed by a `guix system reconfigure', GDM > also suggests GNOME. If I select it, it fails to log in, which I > suppose is expected since it's not installed. > > I believe the GNOME entry in GDM should only appear if GNOME is installed. I investigated this issue. =E2=80=98collect_sessions=E2=80=99 in =E2=80=98gdm-sessions.c=E2=80=99 does= this: --8<---------------cut here---------------start------------->8--- const char *xorg_search_dirs[] =3D { "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", DATADIR "/xsessions/", NULL }; xorg_search_array =3D g_array_new (TRUE, TRUE, sizeof (char *)); const gchar * const *system_data_dirs =3D g_get_system_data_dirs (); for (i =3D 0; system_data_dirs[i]; i++) { session_dir =3D g_build_filename (system_data_dirs[i], "xsessions",= NULL); g_array_append_val (xorg_search_array, session_dir); } g_array_append_vals (xorg_search_array, xorg_search_dirs, G_N_ELEMENTS (xor= g_search_dirs)); if (gdm_available_sessions_map =3D=3D NULL) { gdm_available_sessions_map =3D g_hash_table_new_full (g_str_hash, g= _str_equal, g_free, (GDestr= oyNotify)gdm_session_file_free); } for (i =3D 0; i < xorg_search_array->len; i++) { collect_sessions_from_directory (g_array_index (xorg_search_array, = gchar*, i)); } --8<---------------cut here---------------end--------------->8--- =E2=80=98gnome-desktop.desktop=E2=80=99, which contains the GNOME entry, is= picked up from $(guix build gnome-session)/share/xsessions, which happens to be one of the =E2=80=98system_data_dirs=E2=80=99 elements (via $XDG_DATA_DIR). So I thought that setting: system_data_dirs =3D { NULL }; would solve the issue. Alas, it seems that when we do that, either the array remains empty or somehow =E2=80=98collect_sessions_from_directory=E2= =80=99 is not called. I can=E2=80=99t attach GDM though, or I don=E2=80=99t know what to attach i= t to=E2=80=A6 Ideas anyone? Thanks, Ludo=E2=80=99.