Bad default ls colors for directories

Bug #205090 reported by Sven Boden
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The default color for directories using ls in Hardy is dark blue on a black background. I would prefer a lighter color as default. You can work around it by tweaking the system but whoever chose blue as default isn't using a terminal a lot I think.

How I worked around it
# login
dircolors -b > .dir_colors
# vi .dir_colors
# Change the 34 in "di=01;34" to 33 to get yellow as default e.g.

Revision history for this message
Mika Fischer (zoop) wrote :

Hi Sven,

thanks for taking the time to report this issue!

In your report, are you speaking of the console? Or are you using a terminal program under X/Gnome/KDE?

Revision history for this message
Sven Boden (svenboden) wrote :

I'm using konsole under Kubuntu, but it's probably any "console" type application in which you can use ls.

The workaround in the original post also does not work out of the box (it works for me since I migrated an existing profile with additional changes). The workaround above should actually work according to "man dir_colors".

So preferably:
- The system should comply to the man-pages (man dir_colors, second alinea) ... either /etc/DIRCOLORS or ~/.dir_colors should override ls colors (this is also how it works on fedora e.g.)
- Provide in a non-blue default as directory color.

Revision history for this message
Mika Fischer (zoop) wrote :

These are two issues:
1) The dir_colors man page is definitely wrong. dircolors does not look at any files as far as I can see. So there is no easy way to customize the results other than doing this:
dircolors --print > .dir_colors
$EDITOR .dir_colors

and then call dircolors as: eval `dircolors ~/.dir_colors`

That's not very nice especially since other behaviour is specified in the manpage and worthy of a seperate bug report.

2) The color issue. My tak on this is that it's impossible to do what you suggest and please everybody. In Ubuntu (Gnome) the terminal by default has a white background and yellow directories are barely readable if at all.

Furthermore bash / dircolors has no idea what your background color might be, so we have to return one set of colors for all terminals.

So in my opinion this is a problem of the terminal program (konsole in your case). It should set up its colormap in a way that all colors are readable on the current background.

Please note for instance #202300, where the complaint is that the default color for directories is too *light* :)

So I really think the only way to deal with this is to change the color schemes in the terminal programs.

Revision history for this message
Mika Fischer (zoop) wrote :

Actually, the dircolors behavior is mentioned in the dir_colors(5) man page at the end:
FILES
       /etc/DIR_COLORS
              (Slackware, SuSE and RedHat only; ignored by GNU dircolors(1) and thus Debian.) System-wide configuration file.

       ~/.dir_colors
              (Slackware, SuSE and RedHat only; ignored by GNU dircolors(1) and thus Debian.) Per-user configuration file.

So this is not a bug.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Works fine in KDE 4

Changed in kdebase:
status: New → Invalid
Revision history for this message
Andy Stanford-Clark (andysc) wrote :

Since Hardy (I think), the choice of colours for directories is a poor one: looks like blue text with a dark green highlight, which makes the text completely unreadable on my laptop LCD screen.

Fix is to "unalias ls"

Suggest default definition of ls is "ls", not "ls --color", and let people turn on color if they want to.

Where is this alias defined? At least if it's not deemed a bug, I can go in and turn it off permanently!

But I think it is a bug, particularly for people with any visual impairent, I would think!

Revision history for this message
Harald Sitter (apachelogger) wrote :

.bashrc I would guess.

Revision history for this message
Joshua (joshudson) wrote :

Actual problem here is indeed terminal settings. Blue on black is almost always plenty readable when running on physical console.

Please note this palette has only 16 colors so don't try to get too clever.

The terminal program needs to adjust the palette to something more readable.

Revision history for this message
Nicolas_Raoul (nicolas-raoul) wrote :

Blue on black unreadable for me on Ubuntu Server 2016.04.1 (which has no GUI, by the way)

How the color appears seems to depend on the console emulator, but on Ubuntu Server it is hard to switch to an alternative console emulator.

Maybe that's the terminal of Ubuntu Server that needs to be fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.