Re: User-defined colors in /etc/X11/app-defaults/XTerm

Thomas Wolff via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
Am 28.02.2026 um 07:57 schrieb Fergus Daly via Cygwin:
> I am completely drowned by the volume and complexity (and in some cases antiquity) of responses when googling [variations on]
> "xterm color": e.g. multiple references to all of .Xdefaults, .Xresources, .xinitrc and much much more.
> I do not have any of these. Using xterm within Cygwin the file /etc/X11/app-defaults/XTerm seems to serve all required purposes relating
> to color. I have (comments # below are not part of the file):
>
> xterm*color3:         orange      # for selected text using Find/Replace in nano
> xterm*color10:        darkgreen      # for binaries and any *.sh using ls
> xterm*color12:        blue      # for folders using ls
> xterm*color13:        maroon      # for sockets using ls
> xterm*color14:        brown      # for links using ls
>
> xterm*color1:         purple      # cant find any instances of these 4 being used but often see them in online examples of XTerm
> xterm*color2:         tan
> xterm*color6:         yellow
> xterm*color11:        red
>
> Question 1 I'm not inclined to mend what isn't broken but do others find this file and its location a convenient or even a
> recommended way to control the palette?
That file is a system-wide default. You are better advised to specify 
the same setting in your personal ~/.Xdefaults (and make sure it's 
loaded when you run X11, or do it manually with xrdb ~/.Xdefaults). 
Well, if you're the only user of a Windows machine with cygwin, it would 
not technically matter, but personal user configuration is more portable 
anyway.

> Question 2 I think there are 16 settings available (xterm*colorNN, 1 to 16) but nowhere have I been able to find a reference describing
> what each controls. Can anybody please point me to such a reference?
It's (almost) all described in `man mintty` and 
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html, where colors 0 
to 7 correspond to character attributes SGR 30 to 37 (ESC [ 30 m, etc) 
and colors 8 to 15 to SGR 90 to 97.

> Question 3 In minty not xterm I get pretty much the same thing (sockets are shown purple not maroon; selected text in Find/Replace in
> nano is shown red not orange), but think this is just coincidental.
> I have no idea where mintty in Cygwin (or bash - all different again) get their colors from. Please can anybody say?
In mintty, you can select a colour scheme in the Options dialog. You can 
also install additional themes. Or you can override the individual 
colours of the 16 ANSI colour palette in your .minttyrc or mintty config 
file, as described in section "ANSI colours" of `man mintty`.

> Thank you!
>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.