I recently had some trouble upgrading to Gnome 3.10 on Arch Linux. After running
# pacman -Syu and rebooting, Gnome booted to a grey screen with a functioning cursor but nothing else. This grey screen happened when starting GDM and also when using
startx to run Gnome manually. I was fairly perplexed and switched to Slim+Xfce4 for a few days until I had a chance to figure it out.
Attempting to debug, I looked at the systemd status for trying to start GDM like so:
$ systemctl status gdm
The status showed an error with some text “failed to give slave programs access to the display”.
After digging around in the logs in
/var/log, I found some locale-related errors during the startup of both GDM and Gnome shell. I had previously had locale issues on my system, which I think originally stemmed from using the en_GB.UTF-8 locale for installation and later moving to en_US.UTF-8 (likely screwing something up along the way). In
/etc/locale.gen, I found that I had the following uncommented:
Commenting out the ISO line, running
# locale-gen and rebooting apparently fixed the locale issue with Gnome 3.10, allowing me to boot into GDM and Gnome shell. However, without the ISO line, I found that I started getting the following warning at the beginning of every terminal login:
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
This had other effects, such making the Gnome terminal think that the current locale was “ANSIX3.4-1968″ (which subsequently breaks UTF-8 characters in the terminal). In
/var/log/user.log, I found the following:
user.log:Oct 20 00:06:07 localhost gnome-session: Using the fallback 'C' locale.
user.log:Oct 20 00:06:10 localhost gnome-session: /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US)
So, something was trying to set
LC_ALL=en_US, which is not a full locale specification as far as I can tell. I checked the standard places, including
~/.bashrc, and everything in
/etc/profile.d/ for possible bad settings. Everything looked normal, so I had to do more digging.
At some point, I came across a references to file
/etc/environment, which is something I have no recollection of ever touching. Yet, inside was a single uncommented line:
And there we have it. This file, which is apparently parsed by the
pam_env module, sets up some initial environment variables. It appears that this variable being set was making it impossible for correct, existing locales to be found on the system, and was causing gnome-session to go to the fallback locale since “en_US” was not valid.
Commenting out the offending line in
/etc/environment appears to have fixed my problems, and Gnome 3.10 now works beautifully.