# Using "#define" in .Xdefaults?



## dzaharee (Aug 25, 2011)

I was trying to use Ethan Schoonover's beautiful "Solarized" color scheme (http://ethanschoonover.com/solarized) with xterm, but have had some issues getting the provided .Xdefaults to work.

This (excerpt) doesn't work, and gives messages like "color name S_base03 is not defined":


```
#define S_base03        #002b36
#define S_base02        #073642
#define S_base01        #586e75
#define S_base00        #657b83

*background:            S_base03
*foreground:            S_base00
```

Using the hex values like this:


```
*background:            #002b36
```

works, but I'd prefer to not have to do it this way.

Am I missing something?


----------



## poh-poh (Aug 26, 2011)

Try using xrdb(1) (it runs cpp(1)) in ~/.xinitrc, e.g.
[cmd=]xrdb -merge ~/.Xdefaults[/cmd]
And make sure macros are substituted, e.g.
[cmd=]xrdb -query | egrep '(fore|back)ground'[/cmd]


----------



## dzaharee (Aug 26, 2011)

That did it, thanks!


----------

