GDM refuses to log into Gnome on Debian 9 or 10

  • Open
  • quality assurance status badge
Details
4 participants
  • Josselin Poiret
  • Nicolas Goaziou
  • Rafa Gálvez
  • zimoun
Owner
unassigned
Submitted by
Nicolas Goaziou
Severity
normal
N
N
Nicolas Goaziou wrote on 17 Apr 2019 20:16
(address . bug-guix@gnu.org)
87zhoo8pl7.fsf@nicolasgoaziou.fr
Hello,

I use Guix on top of Debian, with Gnome DE. Once I'm at GDM screen and
I log in successfully, nothing happens, and I'm back to GDM screen. The
only workaround I found is to add the following lines in my .profile:

unset GI_TYPELIB_PATH
unset XDG_DATA_DIRS

Then I can get past GDM. The fix doesn't work if i omit either line. It
doesn't make a difference if I use standard Gnome, or Gnome Wayland. It
doesn't make a difference if I use Debian Testing instead of Stable.

This is not a great fix because applications installed through Guix do
not appear in the Applications menu.

I wasn't able to get any error message to chew on.

Help is welcome.

Regards,

--
Nicolas Goaziou
Z
Z
zimoun wrote on 15 May 2020 16:49
CAJ3okZ39K5hTwjHDNn1zX3QJ_6nJGpSPrD-_TDjLVsgbWcc3EA@mail.gmail.com
Dear Nicolas,

Do you use Gnome from Guix or Gnome from Debian?

All the best,
simon
N
N
Nicolas Goaziou wrote on 15 May 2020 17:02
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 35308@debbugs.gnu.org)
87zha92qd9.fsf@nicolasgoaziou.fr
Hello,

zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (2 lines)
> Do you use Gnome from Guix or Gnome from Debian?

From Debian.

Regards,

--
Nicolas Goaziou
Z
Z
zimoun wrote on 15 May 2020 17:19
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 35308@debbugs.gnu.org)
CAJ3okZ2Fp5JDpJLFkd_YNDa7dAvFJh5vNQRw+wabTs3zdEk_-g@mail.gmail.com
On Fri, 15 May 2020 at 17:02, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Toggle quote (4 lines)
> > Do you use Gnome from Guix or Gnome from Debian?
>
> From Debian.

Since I am currently running Guix on the top of Debian stable with
Gnome installed, I could try to reproduce and investigate.
However, I am not a Gnome user...

Could you indicate me which configuration files I need to tweak?
My Guix stuff are in ~/.bash_profile. I do no use XDG (yet) and I
have only tried to add export XDG_DATA_DIRS with ~/.profile only.
I have a guest account which log by default to Gnome but I have
noticed an issue.


Cheers,
simon
N
N
Nicolas Goaziou wrote on 15 May 2020 21:38
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 35308@debbugs.gnu.org)
87d075xa2y.fsf@nicolasgoaziou.fr
zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (3 lines)
> Could you indicate me which configuration files I need to tweak?
> My Guix stuff are in ~/.bash_profile.

I use ~/.profile, as ~/.bash_profile is not sourced in Wayland, IIRC.
But there's nothing fancy in there, just a few exports, e.g.,

export GUIX_PACKAGE_PATH="$HOME/dev/guix-packages"
export SSL_CERT_DIR="$GUIX_PROFILE/etc/ssl/certs"
export SSL_CERT_FILE="$SSL_CERT_DIR/ca-certificates.crt"

and the two unset directives mentioned in the bug report:

unset GI_TYPELIB_PATH
unset XDG_DATA_DIRS

Toggle quote (4 lines)
> I do no use XDG (yet) and I have only tried to add export
> XDG_DATA_DIRS with ~/.profile only. I have a guest account which log
> by default to Gnome but I have noticed an issue.

Interestingly, I bisected my packages to the rather minimal:

(specifications->manifest '("python-matplotlib"))

With a profile containing just this single package, I cannot go past GDM
if I don't unset the two environment variables above.

I assume there is something fishy in this package, or, more probably, in
its propagated inputs. WDYT?
N
N
Nicolas Goaziou wrote on 19 Nov 2020 15:03
GDM refuses to log in with propagated glib
(address . 35308@debbugs.gnu.org)
87pn49e953.fsf@nicolasgoaziou.fr
Hello,

I digged further, and tracked propagated inputs from
"python-matplotlib". So, it propagates "python-cairo", which in turn
propagates "cairo", and then "glib". Also, no propagated input from
"glib" has an issue with GDM, this is the stop point.

So, basically, if your manifest is:

(specifications->manifest '("glib"))

and you use GDM from a foreign distro (Debian 10 in my case), you cannot
log in.

The only workaround I know of at this point is to add the following
lines to, e.g., ".profile":

unset GI_TYPELIB_PATH
unset XDG_DATA_DIRS

Help would be appreciated at this point.

Regards,
--
Nicolas Goaziou
N
N
Nicolas Goaziou wrote on 17 Dec 2021 10:00
GDM refuses to log into Gnome Shell (was: GDM refuses to log into Gnome on Debian 9 or 10)
(address . 35308@debbugs.gnu.org)
87wnk34nd3.fsf@nicolasgoaziou.fr
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).
--
Nicolas Goaziou
J
J
Josselin Poiret wrote on 17 Dec 2021 11:52
(address . dev@jpoiret.xyz)
87r1aby03f.fsf@jpoiret.xyz
Hello Nicolas,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (15 lines)
> 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
N
N
Nicolas Goaziou wrote on 17 Dec 2021 13:26
Re: bug#35308: GDM refuses to log into Gnome Shell
(name . Josselin Poiret via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87fsqre7ti.fsf@nicolasgoaziou.fr
Hello,

Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (11 lines)
> Nicolas Goaziou <mail@nicolasgoaziou.fr> 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")
>> ...)

[...]

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

You're right. The above fixes the issue with fontconfig. Unfortunately,
the problem persists with the minimal manifest:

(specifications->manifest '("python-matplotlib"))

So there's something else going on.

In order to fix the above, I need to put

unset GI_TYPELIB_PATH

in my .profile, after having sourced Guix profile. Maybe this
environment variable also has a special default value when unset.

Toggle quote (4 lines)
> 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?

I think it is desirable, in particular for fontconfig, which is
a recommended package in the manual. The part of Guix responsible for
generating the profile file may be more careful when setting
XDG_DATA_DIRS, e.g., with something like (untested):

export XDG_DATA_DIRS=\
"${GUIX_PROFILE:-/gnu/store/…-profile}/share${XDG_DATA_DIRS:+:}${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"

Regards,
--
Nicolas Goaziou
J
J
Josselin Poiret wrote on 17 Dec 2021 13:33
87o85fxvg3.fsf@jpoiret.xyz
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (14 lines)
> You're right. The above fixes the issue with fontconfig. Unfortunately,
> the problem persists with the minimal manifest:
>
> (specifications->manifest '("python-matplotlib"))
>
> So there's something else going on.
>
> In order to fix the above, I need to put
>
> unset GI_TYPELIB_PATH
>
> in my .profile, after having sourced Guix profile. Maybe this
> environment variable also has a special default value when unset.

Can you try again with `export
GI_TYPELIB_PATH=/usr/lib/girepository-1.0/` before sourcing the profile?

Best,
Josselin Poiret
N
N
Nicolas Goaziou wrote on 17 Dec 2021 18:11
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
87r1ab9mwf.fsf@nicolasgoaziou.fr
Josselin Poiret <dev@jpoiret.xyz> writes:

Toggle quote (20 lines)
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> You're right. The above fixes the issue with fontconfig. Unfortunately,
>> the problem persists with the minimal manifest:
>>
>> (specifications->manifest '("python-matplotlib"))
>>
>> So there's something else going on.
>>
>> In order to fix the above, I need to put
>>
>> unset GI_TYPELIB_PATH
>>
>> in my .profile, after having sourced Guix profile. Maybe this
>> environment variable also has a special default value when unset.
>
> Can you try again with `export
> GI_TYPELIB_PATH=/usr/lib/girepository-1.0/` before sourcing the
> profile?

Tough luck. The problem is still there.

Regards,
R
R
Rafa Gálvez wrote on 6 Jul 2023 11:31
RE: GDM refuses to log into Gnome on Debian 9 or 10
(address . 35308@debbugs.gnu.org)
874jmhfkt3.fsf@esat.kuleuven.be
Hi,

I ran today into this problem using Ubuntu 22.04.2 LTS, and Josselin
Poiret's fix worked perfectly:
`export GI_TYPELIB_PATH=/usr/lib/girepository-1.0/`

I installed Guix already some time ago, and the guix-install.sh script
I used was very different from the one currently in master. So before
applying this fix, I ran these functions from the script:
sys_create_init_profile
sys_create_shell_completion
sys_customize_bashrc

Then I added the export GI_TYPELIB_PATH to /etc/profile.d/zzz-guix.sh,
restarted the laptop, and problem solved.

Best,

Rafa
?