PDA

View Full Version : [SOLVED] .Xdefaults not getting loaded



slackorama
January 21st, 2010, 06:37 PM
I have the following in my .Xdefaults:



#define COLOR_FG #dcdccc
URxvt.background: COLOR_BG


but every time I start urxvt, it comes up all hot pink and the following is in my .xsession-errors. It seems like the DEFINE isn't getting executed properly.



urxvt: unable to parse color 'COLOR_BG', using pink instead.


But if I go into gnome-terminal, run 'xrdb -merge ~/.Xdefaults' and then start up urxvt everything is fine color-wise. The load runs without any errors.

This only started happening after I upgraded to 9.10. Do I need to add xrdb -load ~/.Xdefaults or something similar to my startup applications? I thought that .Xdefaults was loaded when X started up?

Thanks in advance.

Brandon Williams
January 21st, 2010, 09:09 PM
I assume that 'COLOR_FG' in your post was just a typo, and that it's really 'COLOR_BG'.

It looks like /etc/gdm/Xsession wants you to call the file .Xresources instead of .Xdefaults. That said, it runs xrdb with the -nocpp flag, so it probably won't handle your #define either. You might need to add a callout to xrdb -merge as a startup application in order to get it to use the preprocessor.

slackorama
January 21st, 2010, 09:16 PM
I assume that 'COLOR_FG' in your post was just a typo, and that it's really 'COLOR_BG'.

It looks like /etc/gdm/Xsession wants you to call the file .Xresources instead of .Xdefaults. That said, it runs xrdb with the -nocpp flag, so it probably won't handle your #define either. You might need to add a callout to xrdb -merge as a startup application in order to get it to use the preprocessor.

Thanks and DOH! It was a typo.

The tip about 'nocpp' was the root of the problem (and thanks for deciphering my gibberish).

Brandon Williams
January 21st, 2010, 10:18 PM
I just noticed another place where .Xresources will be merged, this time without the -nocpp flag. Did you have to remove the #define in order to get your .Xresources file merged in automatically? If so, then it appears that the other xrdb call I found isn't actually having an effect.

slackorama
January 21st, 2010, 11:18 PM
Yeah, once I removed the #define statements, everything started working.

Thanks again.