Subject: bug#35308: GDM refuses to log into Gnome Shell (was: GDM refuses to log into Gnome on Debian 9 or 10)

From: Josselin Poiret <[email-masked]>
Date: Fri, 17 Dec 2021 11:52:52 +0100

Hello Nicolas,

Nicolas Goaziou <[email-masked]> writes:

> I went a bit further:
>
> The issue is not specifically glib-related, but can be reproduced with
> any package using the following:
>
>   (search-path-specification
>    (variable "XDG_DATA_DIRS")
>    ...)
>
> Hence, the following manifest can reproduce the problem:
>
>   (specifications->manifest '("fontconfig"))
>
> even though fontconfig does not depend on glib (but does search XDG_DATA_DIRS).

Someone on IRC had this exact problem (down to the fontconfig minimal
reproducer :) ), and thanks to your pointer about XDG_DATA_DIRS, I've
figured out what the issue is.

The XDG specification says that if XDG_DATA_DIRS is unset, a default
value of `/usr/local/share/:/usr/share/` should be used in its place.
On Debian, that env var is not explicitely set, so applications use that
default value, but when we prepend to it, it effectively removes both of
these directories from the search path.

As a workaround, you can do `export
XDG_DATA_DIRS=/usr/local/share/:/usr/share/` right before sourcing the
guix profile in your .bash_profile.  I don't know what the best course
of action here is to have better OOB support.  Is it possible to have
env vars set by Guix have a default value if unset?

Best,
Josselin Poiret