good .Xdefaults

Thomas Dickey
Sat May 7 17:29:00 GMT 2005

On Sat, 7 May 2005, Jack Tanner wrote:

> Alexander Gottwald wrote:
>> The colors are defined in /usr/X11R6/lib/X11/rgb
>> If the file is not installed, broken or somehow the xserver tries to use
>> a different file then the colors are not defined.
> I have a /usr/X11R6/lib/X11/rgb.txt. I also created a symbolic link, 
> rgb->rgb.txt.
>> showrgb should print a lot of entries if everything is ok.
> It does.
> $ showrgb | grep black
>  0   0   0             black
> Still, I get Warning: Color name "black" is not defined.
> Attention Thomas Dickey: By the way, there's a wrap-around error when that 
> message is printed; it double-backs onto itself. TERM=xterm, latest Xorg, 
> xterm, and terminfo.

showrgb and grep don't (afaik) depend on the terminfo.

wrap-around issues with cygwin could be due to stray carriage-returns 
(guess).  You should be able to test this by redirecting
 	showrgb | grep black >foo
 	cat foo
(also check the contents with vi, etc.).

> Despite the warning, the colors do take effect! That is, my .Xdefaults 
> contains
> xterm*Foreground: white
> xterm*Background: black

Foreground/Background set the class names (usually foreground/background
are preferred).  Setting the class names can produce some odd effects.
I haven't looked at that for a while, but do recall some comments that
it has the effect of disabling ANSI colors, e.g., for text.

> and the xterm gets the colors appropriately, although when it just starts, 
> the background is washed white, and only turns to black after I do 
> /usr/bin/clear.

...which is odd - the only thing I could think of is that /usr/bin/clear
on cygwin is a termcap application, and the /etc/termcap is modified to
set colors explicitly (I've seen people doing that on other systems, so
it's something to check).

Thomas E. Dickey

More information about the Cygwin-xfree mailing list