delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/28/08:42:13

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61SDgDm62384955
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 61SDgDm62384955
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Rt8+FbI8
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22BDD4BA23E4
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1772286131;
bh=QAzATZkRWB5ZSOQP5QQJGGbCzfw5SnpFjhZCBUOL224=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=Rt8+FbI8Z+Coch/HY5b8ebLmQX+bhVHhQpJN9fVbeY1S1zsj55v1kMcAFJZUB2PRh
ExL/ZZwonbiferrRH45FmAL9Mklc+hiQDrM3HRxC9i56exwWMzTwBrZ5KX1SNST5Hl
I/Kxja+kKmetH+N9Gfh0glCkKeJHaHCwJI05bmss=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F72F4BA2E19
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1F72F4BA2E19
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772286111; cv=none;
b=Uq4g8Hho5iZi53Xjsa2DJQtg8caPVkwRtuwliX8bJK/S83ZeMK9iEzsMRA8ROcw1YU+fK8mm2b6JalGoLXfwmHIKIg3C17E77iej/nLoG1fory+WWY8nz9uEU0zj/U5edeSarRChQdfV9IiW8VtOVv4XSxYzssbiU4bL7s9xPTk=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1772286111; c=relaxed/simple;
bh=2THJvxBOhPAL2rpC5Bbt7Y6pDaa+4xkO/YisTq5A414=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=KCtITjQYK+GBkcq26dpDTBpR1VOli5feYSwLMyuV4uxLe5cwAcxO4H8z22WmEB610+vc/PAhJVcwBQxvnfEZdab8Ny7jsDO22sWuna+0O4InGdI2tPeM4OXHweViCUgxTGPOAPE4Ml2UnEF8Xuh3305p2ussqA4SROt/gco85RA=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F72F4BA2E19
X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu
X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136
DKIM-Filter: OpenDKIM Filter v2.11.0 mailsrv.cs.umass.edu D1E115BDCC
X-Barracuda-RBL-Trusted-Forwarder: 172.26.69.67
Message-ID: <0073736b-46dd-b78f-90f1-288ca71db9bb@cs.umass.edu>
Date: Sat, 28 Feb 2026 08:41:47 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: User-defined colors in /etc/X11/app-defaults/XTerm
X-ASG-Orig-Subj: Re: User-defined colors in /etc/X11/app-defaults/XTerm
To: Fergus Daly <fergusd84 AT outlook DOT com>,
"'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
References: <FR8PR09MB855111A974D1084247E6303DA470A AT FR8PR09MB8551 DOT eurprd09 DOT prod DOT outlook DOT com>
In-Reply-To: <FR8PR09MB855111A974D1084247E6303DA470A@FR8PR09MB8551.eurprd09.prod.outlook.com>
X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136]
X-Barracuda-Start-Time: 1772286107
X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384
X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi
X-Barracuda-BRTS-Status: 1
X-Virus-Scanned: by bsmtpd at cs.umass.edu
X-Barracuda-Scan-Msg-Size: 3677
X-ASG-Debug-ID: 1772286107-24039d2fd5448b0001-w5GHUG
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5
QUARANTINE_LEVEL=10.0 KILL_LEVEL=9.7 test=
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.125474
Rule breakdown below
pts rule name description
---- ---------------------- --------------------------------------------------
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Eliot Moss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Eliot Moss <moss AT cs DOT umass DOT edu>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On 2/28/2026 1:57 AM, Fergus Daly via Cygwin wrote:
> 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?

It's usually not recommended to change the system wide file in /etc.  The preferred
method is to override using your individual .Xresources or .Xdefaults.

> 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?

color0 through color15 set the 16 colors that will be used for the colors of
the 16-color ANSI color scheme.  There are escape codes that programs can send
to the terminal to select the foreground and background color for text written
after the color change.  The 16 are considered to be 8 normal intensity colors
and 8 "bright" versions of the same colors.  The colors (I think in order) are
black, red, green, yellow, blur, magenta, cyan, and white.  Applications use
them as they will, and which color they use for what may or not be controllable,
depending on the application.

> 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?

First, I think you're focusing on the colors that ls uses (which is fine), but the
colors done by number in the xterm configuration files actually apply to all applications.
Just so you know, xterm also supports a 256-color scheme and 24-bit RGB (red/green/blue)
color scheme, which covers the full palette of many (most?) screens.

As for ls, you can also instruct it as to which color to use for what.  See man ls
and man dircolors.  Here's a web page about dircolors:

https://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors

Basically, you use dircolors to help get a setting for the LS_COLORS environment variable.
LS_COLORS is easily customized once you have a starting value.  It indicate the color for
ls to use when coloring a wide range of file types, etc.

The colors for mintty are controlled in ~/.minttyrc.  It appears to work somewhat
differently from xterm but to give the same level of control.

> Thank you!

No problem.  You can find a lot more on the web, though I admit it helps to know how
to frame the question :-) ...

HTH, and now a response will be in the archive for the future.  Eliot Moss

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019