In 11.04 ~/.Xresources fails to load correctly after login from gdm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdm (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gdm
After upgrading to natty my ~/.Xresources was not be loaded correctly. I tracked it down the addition of the -nocpp option to the xrdb command in /etc/gdm/Xsession at line 105. Removing that option fixed the issue. I use a number of include statements in my ~/.Xresources and the addition of the -nocpp option prevents them from being processed.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gdm 2.32.1-0ubuntu3
ProcVersionSign
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Thu May 19 21:16:04 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en_US:en
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gdm
UpgradeStatus: Upgraded to natty on 2011-04-29 (20 days ago)
I've just run into this too, after trying to hook the Solarized colour scheme Xresources <https:/ /github. com/altercation /solarized/ blob/master/ xresources- colors- solarized/ Xresources> into my ~/.Xresources file. Because the file isn't being processed by the C preprocessor any more the preprocessor symbols don't get expanded and, in my case, urxvt (rxvt-unicode) substitutes bright pink for the colours it can't make sense of.
It's a bit misleading, because a first look around would suggest that the resources are loaded by /etc/X11/ Xsession. d/30x11- common_ xresources and there the -nocpp option isn't used. It's only when you dig a bit deeper that you spot the the resources are actually loaded in /etc/gdm/Xsession with the -nocpp option. Further, where /etc/gdm/Xsession does run through the scripts in /etc/X11/ Xsession. d, it doesn't set up the environment completely. The fix to bug #398300 added some of the required environment variables (around lines 290 to 294) but didn't finish the job by setting up everything that /etc/X11/Xsession would do.
The workaround that I posted in bug #398300 still works for this bug: Create a ~/.xprofile that contains the following:
SYSRESOURCES= /etc/X11/ Xresources $HOME/. Xresources
USRRESOURCES=
and the 30x11-common_ xresources script should work as intended. It seems a bit redundant as it duplicates behaviour from the /etc/gdm/Xsession script - xrdb is being run more times than really is necessary. But it works for me.
Of course, I don't expect this to get fixed. The next release will replace gdm with LightDM so we'll have a new session setup script to debug.