I installed Arch Linux along with GNOME 3 yesterday. I have a git repository to keep all my settings the same across all devices.
This is how my
.Xresources looks like:
#include "Xresources.d/xterm" #include "Xresources.d/Xft"
I use different files for each application settings and
#include them into the main
.Xresources file. That’s works
However, it seems that GDM ignores all
.Xresources file. I didn’t have such issues in Fedora, so I
assume this is Arch Linux specific thing.
After some investigation I found that
/etc/gdm/Xsession has the following code:
if [ -f "$userresources" ]; then xrdb -nocpp -merge "$userresources" fi
-nocpp This option indicates that xrdb should not run the input file through a preprocessor before loading it into properties.
It means, that
cpp preprocessor doesn’t get called and that’s why included files were not loaded.
The fix is simple: just edit the
/etc/gdm/Xsession file and remove
-nocpp option from the command that loads
if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi
Maintainers decided to use
-nocpp flag because of performance. It seems that calling the
cpp preprocessor is quite
expensive operation. Most of users don’t use
#define, etc. in their
.Xresources file. By using
you can decrease startup time of your graphic environment.