Bug 239266 - 'ls' output is not in color with xterm-256color
Summary: 'ls' output is not in color with xterm-256color
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: F8Target
TreeView+ depends on / blocked
 
Reported: 2007-05-07 08:56 UTC by Leo
Modified: 2008-01-17 16:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-17 11:02:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Leo 2007-05-07 08:56:34 UTC
Description of problem:
I have set the resource "XTerm.termName: xterm-256color". Now `ls` output in
xterm is always in black and white, no colors at all. However if I start another
xterm with "xterm -tn xterm" (i.e. use the default 8-color term), `ls' output
has colors.

Version-Release number of selected component (if applicable):
xterm-225-2.fc7

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Miroslav Lichvar 2007-05-07 09:39:43 UTC
dircolors don't know about xterm-256color, an extra entry in /etc/DIR_COLORS*
would be needed to have this working.

Also would be nice to have an entry for rxvt-unicode terminal.

Comment 2 Jim Meyering 2007-05-07 09:53:02 UTC
Thanks for the report. This was fixed in coreutils-6.0. rawhide is at coreutils-6.9.

  $ /usr/bin/dircolors --p|grep -E uni\|256
  TERM rxvt-unicode
  TERM xterm-256color
  $ /usr/bin/dircolors --ver|head -1
  dircolors (GNU coreutils) 6.9


Comment 3 Leo 2007-05-07 10:28:04 UTC
(In reply to comment #2)
> Thanks for the report. This was fixed in coreutils-6.0. rawhide is at
coreutils-6.9.
> 
>   $ /usr/bin/dircolors --p|grep -E uni\|256
>   TERM rxvt-unicode
>   TERM xterm-256color
>   $ /usr/bin/dircolors --ver|head -1
>   dircolors (GNU coreutils) 6.9

Does that mean you can't reproduce this bug?


Comment 4 Miroslav Lichvar 2007-05-07 10:39:48 UTC
/etc/profile.d/colorls.* don't use the precompiled database, so /etc/DIR_COLORS
needs to be updated.

Comment 5 Jim Meyering 2007-05-07 11:23:48 UTC
Ah.  I see what you mean.  If there is a good reason to maintain /etc/DIR_COLORS
separately from the database that is printed by dircolors -p, then it would be
nice to generate it, so that they stay in sync.  Tim, if you're interested, I'm
sure we can merge things so that it can be generated -- or even identical to the
built-in DB.  Ideally, /etc/profile.d/* would use something like this:
  eval "`dircolors`"
by default.

Comment 6 Tim Waugh 2007-05-08 09:56:17 UTC
Oh, maybe the spec file should generate DIR_COLORS at build time -- is that what
you mean?

Comment 7 Jim Meyering 2007-05-08 10:05:49 UTC
That's a good first step.  In addition, if the shell snippets in
/etc/profile.d/* were to use eval "`dircolors --whatever`" (and not use
/etc/DIR_COLORS anymore), then they would work also with older and newer
versions of ls/dircolors, rather than just with the system-installed versions.

Comment 8 Leo 2007-05-22 16:14:19 UTC
To work around the bug before a fixed coreutils is available:

dircolors -p > ~/.dir_colors


Comment 9 Leo 2007-05-29 11:17:04 UTC
Please also support "screen-256color" along with term-256color and rxvt-unicode.


Comment 10 Leo 2007-05-29 11:17:47 UTC
(In reply to comment #9)
> Please also support "screen-256color" along with term-256color and rxvt-unicode.
                                                   ^ read 'xterm-256color'


Comment 11 Thomas E. Dickey 2007-06-12 13:29:18 UTC
It would be nice if dircolors used terminfo or termcap
rather than a set of hardcoded values which are a nuisance to
everyone else.

Comment 12 Leo 2008-01-16 20:42:21 UTC
Has this bug been forgotten? I would love to see it fixed in Fedora 9.

Comment 13 Ondrej Vasik 2008-01-17 11:02:07 UTC
Yes and no. As you can see in changelog(rawhide, 6.9-12.fc9) I ported upstream
supported dircolors to dircolors.hin file - but this was not enough because
shipped DIR_COLORS and DIR_COLORS.xterm are not generated automatically and have
to be modified manually. Unfortunately - I forgot to do that in that build. Now
added and built as coreutils-6.9-17.fc9. Closing RAWHIDE, feel free to reopen it
if adding requested TERMs to DIR_COLORS and DIR_COLORS.xterm is not sufficient
for you.

Anyway - even this bugzilla got closed I will think about generating those
DIR_COLORS files at build time - maybe at least DIR_COLORS file could be
generated from dircolors.hin which provides (hopefully) complete list of colored
TERMs supported by ls.

Comment 14 Leo 2008-01-17 16:22:43 UTC
Thank you for working on fixing this.

Is it possible to push the update for F8?


Note You need to log in before you can comment on or make changes to this bug.