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).

thanks

link|improve this question
feedback

2 Answers

You can find a copy of the file here.

You can also add this line to ~/Xdefaults:

xterm*foreground:   gray
link|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
feedback

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'
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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