Subject: bug#45360: Cannot log in to GNOME on foreign distro with Guix

From: Evan Straw <[email-masked]>
Date: Mon, 21 Dec 2020 21:38:47 -0800

Hello,

I'm running Ubuntu 20.04.1 LTS with Guix installed on top as a package
manager.

--8<---------------cut here---------------start------------->8---
evan@navi:~$ guix describe
Generation 30	Dec 21 2020 13:21:53	(current)
  guix f00e68a
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: f00e68ace070fd5240a4b5874e61c26f6e909b6c
  personal bd255b1
    repository URL: https://git.sr.ht/~estraw/guix-channel
    branch: master
    commit: bd255b10b22e612971bd8daf9c2ab3d3014a0b7c
--8<---------------cut here---------------end--------------->8---

One day, I went to log in after rebooting my PC (I had performed a `guix
pull` the same day) and upon entering my password, I was just brought
immediately back to the login screen. Checking the system journal, I
found that gnome-session is outputting several errors like

--8<---------------cut here---------------start------------->8---
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.A11ySettings'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Color'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.A11ySettings'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Color'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Datetime'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Datetime'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Housekeeping'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Housekeeping'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Keyboard'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Keyboard'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.MediaKeys'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.MediaKeys'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Power'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Power'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.PrintNotifications'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Rfkill'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.ScreensaverProxy'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.PrintNotifications'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Rfkill'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.ScreensaverProxy'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Sharing'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Sharing'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Smartcard'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Smartcard'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Sound'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Sound'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Wacom'
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.Wacom'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.XSettings'
Dec 17 22:27:14 navi gnome-session[24407]: gnome-session-binary[24407]: CRITICAL: We failed, but the fail whale is dead. Sorry....
Dec 17 22:27:14 navi gnome-session-binary[24407]: WARNING: Unable to find required component 'org.gnome.SettingsDaemon.XSettings'
Dec 17 22:27:14 navi gnome-session-binary[24407]: CRITICAL: We failed, but the fail whale is dead. Sorry....
--8<---------------cut here---------------end--------------->8---

When I disable the shell script in /etc/profile.d/ that exports
necessary environment variables for Guix, the problem disappears, and I
am able to log in again, which makes me suspect that maybe some of the
environment variables that Guix sets are confusing GNOME somehow. I'm
not sure if it is caused by one of the packages I have installed from
Guix, but I know that when I limit my profile to only Emacs and the
Emacs packages I have installed from Guix, I am able to log in
again. When I add a package (like stumpwm) that needs to set
XDG_DATA_DIRS, the problem seems to reappear. I also was able to
reproduce the problem on another machine I have that runs the same
operating system and also has Guix.

Is this a bug, or is it possible I've just misconfigured something?
Please let me know if I'm missing any needed information and I'll do my
best to provide it.

-- Evan Straw <[email-masked]>