Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried xterm -fg gray and xterm -fg grey but both gave Warning: color name... is not defined.

I am on ubuntu and there is no rgb.txt in /etc/X11/rgb.txt

How can I launch xterm with custom fg/bg colors? (specific rgb values).


share|improve this question

You can find a copy of the file here.

You can also add this line to ~/Xdefaults:

xterm*foreground:   gray
share|improve this answer
Thanks. Is there an alternative if one doesnt have root access? – jp19 Feb 19 '11 at 5:51
actually, for now, I have root access. I copied the file, but it still does not recognize the color definitions in rgb.txt – jp19 Feb 19 '11 at 5:54
@jp19: Please see my edited answer. – Dennis Williamson Feb 19 '11 at 6:07

Xorg no longer uses rgb.txt for color names, but builds the color database into the X server when it's built. The rgb.txt built into the X server comes from the app/rgb module upstream, and the upstream version can be viewed in their git viewer.

To specify colors by value, see the "COLOR NAMES" section of the X(7) man page. For instance, these should each be gray:

xterm -bg rgb:80/80/80
xterm -bg '#808080'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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