GDM has a GNOME entry even when not installed

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Pierre Neidhardt
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
important
P
P
Pierre Neidhardt wrote on 20 Oct 2019 13:15
(address . bug-guix@gnu.org)
87lftfd5wi.fsf@ambrevar.xyz
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.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2sQd0ACgkQm9z0l6S7
zH9tZwgAqHrmKUwJ9tjmgQfdCWQrPvoALiGRlvG0zHKzcrN/nQEALk3VLQAr+vrb
qx9It0YZrug+XPWwdaWLHk2fZOh2CujhCA0Ix7awQ/ENf9CBplKfXMwJKtYRSE4j
V6kdix7PAAt6okwCRsZ5hVWT37G1cdBCXOreUvWn3qY864x8wwZk5OESJo6btVwt
RFf5S4JHDwmw59eu7vC4ihqQ4UufviXpqNl637K5n3PSC3H6wSEtGTP6t0x8JUyt
JcgS0h3z569jG8ZAY0u7vgIn5JuNmTOyry3RHht8Ez7oyLqv/KHzhp/XtVobfzPI
mcb4kPRhjYNwrUSRXupCedl47xz6iA==
=UWz/
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 14 Feb 2020 20:14
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 37831@debbugs.gnu.org)
87h7ztj81a.fsf@gmail.com
Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (10 lines)
> 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 can confirm the issue, attempting to use GDM + ratpoison (without
GNOME installed).

Maxim
L
L
Ludovic Courtès wrote on 11 Apr 2020 12:31
control message for bug #37831
(address . control@debbugs.gnu.org)
875ze6titj.fsf@gnu.org
severity 37831 important
quit
L
L
Ludovic Courtès wrote on 11 Apr 2020 18:31
Re: bug#37831: GDM has a GNOME entry even when not installed
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 37831@debbugs.gnu.org)
87blnyrnkb.fsf@gnu.org
Hi,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (10 lines)
> 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.

‘collect_sessions’ in ‘gdm-sessions.c’ does this:

Toggle snippet (29 lines)
const char *xorg_search_dirs[] = {
"/etc/X11/sessions/",
DMCONFDIR "/Sessions/",
DATADIR "/gdm/BuiltInSessions/",
DATADIR "/xsessions/",
NULL
};

xorg_search_array = g_array_new (TRUE, TRUE, sizeof (char *));

const gchar * const *system_data_dirs = g_get_system_data_dirs ();

for (i = 0; system_data_dirs[i]; i++) {
session_dir = 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 (xorg_search_dirs));

if (gdm_available_sessions_map == NULL) {
gdm_available_sessions_map = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, (GDestroyNotify)gdm_session_file_free);
}

for (i = 0; i < xorg_search_array->len; i++) {
collect_sessions_from_directory (g_array_index (xorg_search_array, gchar*, i));
}

‘gnome-desktop.desktop’, which contains the GNOME entry, is picked up
from $(guix build gnome-session)/share/xsessions, which happens to be
one of the ‘system_data_dirs’ elements (via $XDG_DATA_DIR).

So I thought that setting:

system_data_dirs = { NULL };

would solve the issue. Alas, it seems that when we do that, either the
array remains empty or somehow ‘collect_sessions_from_directory’ is not
called.

I can’t attach GDM though, or I don’t know what to attach it to…

Ideas anyone?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 12 Apr 2020 00:23
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 37831-done@debbugs.gnu.org)
87wo6lr79d.fsf@gnu.org
Pierre Neidhardt <mail@ambrevar.xyz> skribis:

Toggle quote (10 lines)
> 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.

Alright, I eventually succeeded and pushed a fix as
f4ec5e1a9823a66c27fe2bc033db7b58b29edfef (‘version-1.1.0’; will merge
later on ‘master’). Woohoo!

AFAICS it works as advertised, but please report any issues!

Ludo’.
Closed
P
P
Pierre Neidhardt wrote on 12 Apr 2020 09:52
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37831-done@debbugs.gnu.org)
87eestgmza.fsf@ambrevar.xyz
Thanks!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6SyKkACgkQm9z0l6S7
zH8WRggAntf+cGCk53FkDD6gsI9fBB/5yYpS2n54ephNgJJuZe0feg4u06N8bEsY
DhmET7r3fMR8r4tu0EBeEMWfy/nt5i+5JXRZ9B6xvgy4P5u4WuMeteyJzT6SPqez
SliWHGBRSZGM3ZOCJnOSErCT207J2ZRFyntkJGheQS4zaTsZnlubiGLXF+T7kjvW
mEeR2s1e0egODxuFF24BqCfvlBsufz0Z1nzZ26bcAQd7sYzGsPsHGTAkY1LIhj3r
mas2rbec0whXSRxQu+B7van/m6jo/MBi9Y1KBtnBUQ+LcGZpJFc56Gn8otDyWd3t
LDWJ34JnLkfP7JkychA2Z3qZFXSW1g==
=ou+C
-----END PGP SIGNATURE-----

Closed
?