Problem with dircolors

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
mobius
Posts: 47
Joined: 12. Nov 2016, 23:11
Location: Canada

Problem with dircolors

Post by mobius »

Hi. This is probably more of a general Linux question than a Salix specific one. I'm getting Salix set up in a VM (VirtualBox) on a Windows 10 host. I've already got a lot of the work done with the theming, etc. with help from the Xfce forum. Now I'm trying to get the console set up to my liking, and am starting with the directory colours.

So, in the initial .bashrc, there are no related definitions, and an ls listing (with --color=auto) is just white. I piped the output of dircolors and added that output to the statement 'export LS_COLORS=output' in .bashrc, and after sourcing, I now get a coloured ls listing with the default colours.

But I can't seem to change those colours. I've placed an edited DIR_COLORS file in my home directory, and in the console ran the command 'dircolors -b ~/DIR_COLORS'. The command seems to produce the desired output (i.e. 'LS_COLORS='...'; export LS_COLORS), but it does not in fact change the LS_COLORS variable, and I still see the old colours, both in LS_COLORS and in ls.

In fact, if I unset the LS_COLORS variable and export it, ls still produces a coloured output, even though the variable is empty. And if I again run the dircolors command, it displays the output but the variable remains empty. I have no idea where ls is getting those colours from. Doesn't ls evaluate LS_COLORS on every invocation? Even if it is only evaluated when sourced, I also tried commenting the line in .bashrc and resourcing, but still get those old colours. Hmm... what should I try next?
Real men don't systemd.

Friends don't let friends systemd.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Problem with dircolors

Post by djemos »

man dir_colors
less /etc/DIR_COLORS
less /etc/shell-colors
less /etc/profile.d/coreutils-dircolors.sh
Post Reply