I am trying to get the Solarized color scheme for xterm, but have not had much success with it. I am running Debian 6 and downloaded the Xresources to ~/.Xresources.

After loading the new settings with xrdb -load ~/.Xresources, I get a XTerm with the blueish background from the theme, but no font colors. Xterm with solarized theme

The default xterm is capable of color, as you can see below: default xterm with Debian

How do I get the colors from solarized to show?

  • 1
    I'm not seeing the problem here. The font colours are working (blue/light blue primarily). – Chris Down Feb 28 '12 at 11:34

Your terminal is being colored by the new theme, as you can see from the new background and foreground colors. However, to make ls use more colors than the default set of colors, you should create a dir_colors config file and let it be sourced from ~/.bashrc. This file contains color and filetype pairs that are used to differentiate between different file types and their corresponding color to display. The environment variable LS_COLORS should hold this data after sourcing and ls will use this to display filenames accordingly.

The color code sequences used in dir_colors are equivalent to the bash escape codes for displaying text in colors -- 1;31 will be bold red; 0;31 will be normal red. Also, remember that these colors are always relative to the ones defined in ~/.Xresources so the red color for instance, will correspond to XTerm*color1 and so on.


I had the same problem and solved it by adding to my ~/.xinitrc this line:

  • Interesting, but could you expand on what does it affect exactly? – Marcin Jan 4 '13 at 15:37

Download extension for ls colors :

$ git clone git://github.com/seebi/dircolors-solarized.git
$ cp dircolors-solarized/dircolors.256dark .dircolors

.bashrc would automatic source ~/.dircolors

  • Just to be clear: You don't have to source .dircolors in your .bashrc. As long as you copy the relevant file to ~/.dircolors, your bash should do the rest automatically. – Charl Botha Apr 10 '13 at 14:05

Put into ~./bashrc this to load colors from your .directory file:

if [ "$TERM" != "dumb" ]; then
[ -e "$HOME/.dircolors" ] && DIR_COLORS="$HOME/.dircolors"
[ -e "$DIR_COLORS" ] || DIR_COLORS=""
eval "`dircolors -b $DIR_COLORS`"
alias ls='ls --color=auto'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.