[Solved] xfce-terminal -- some files greyed out

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
mpz_t
Posts: 18
Joined: 2024-06-14 16:09
Has thanked: 8 times

[Solved] xfce-terminal -- some files greyed out

#1 Post by mpz_t »

I often "cp -a" a file before making changes and I usually assign a suffix of ".bak" to those files. But later, when I want to display files with "ls", the ones with the ".bak" suffix are greyed and barely visible. Is there a way to change this?
Last edited by mpz_t on 2024-11-20 19:39, edited 1 time in total.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 264 times

Re: [Software] xfce-terminal -- some files greyed out

#2 Post by fabien »

Hello,
man 1 ls wrote: Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The
LS_COLORS environment variable can change the settings. Use the dircolors(1) command to set it.
Check that you have something like this in your ~/.bashrc

Code: Select all

# enable color support of ls
if [ -x /usr/bin/dircolors ]; then
   test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi
man 1 dircolors wrote:
SYNOPSIS
       dircolors [OPTION]... [FILE]
[...]
       -p, --print-database
              output defaults
[...]
      If  FILE  is  specified, read it to determine which colors to use for which file types and extensions.  Otherwise, a precompiled database is used.  For details on the format of these files, run
       'dircolors --print-database'.

Code: Select all

$> dircolors --print-database > ~/.dircolors
edit ~/.dircolors to your liking

Code: Select all

$> dircolors --print-ls-colors | grep "\.bak"
*.bak	00;90
$> dircolors --print-ls-colors ~/.dircolors | grep "\.bak"
*.bak	00;91
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

CwF
Global Moderator
Global Moderator
Posts: 3117
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 63 times
Been thanked: 261 times

Re: [Software] xfce-terminal -- some files greyed out

#3 Post by CwF »

This can be controlled by the xfce4-terminal theme. You could try other default themes, or dive into customizing one for yourself. Now, in 1.0.4, this setting is in Terminal Preferences>Colors>Presets at the bottom of the tab.
Mottainai

mpz_t
Posts: 18
Joined: 2024-06-14 16:09
Has thanked: 8 times

Re: [Software] xfce-terminal -- some files greyed out

#4 Post by mpz_t »

fabien wrote: 2024-11-20 18:13 Hello,
man 1 ls wrote: Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The
LS_COLORS environment variable can change the settings. Use the dircolors(1) command to set it.
Check that you have something like this in your ~/.bashrc

Code: Select all

# enable color support of ls
if [ -x /usr/bin/dircolors ]; then
   test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
fi
man 1 dircolors wrote:
SYNOPSIS
       dircolors [OPTION]... [FILE]
[...]
       -p, --print-database
              output defaults
[...]
      If  FILE  is  specified, read it to determine which colors to use for which file types and extensions.  Otherwise, a precompiled database is used.  For details on the format of these files, run
       'dircolors --print-database'.

Code: Select all

$> dircolors --print-database > ~/.dircolors
edit ~/.dircolors to your liking

Code: Select all

$> dircolors --print-ls-colors | grep "\.bak"
*.bak	00;90
$> dircolors --print-ls-colors ~/.dircolors | grep "\.bak"
*.bak	00;91
dircolors 00;91 changed color to red, how do I change it to white?

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 264 times

Re: [Software] xfce-terminal -- some files greyed out

#5 Post by fabien »

Thanks for marking you topic as solved.
mpz_t wrote: 2024-11-20 19:08 dircolors 00;91 changed color to red, how do I change it to white?
How about experimenting a little?

Code: Select all

$> echo -e "\e[00;32m test \e[0m"

Code: Select all

$> echo -e "\e[00;33m test \e[0m"

Code: Select all

$> echo -e "\e[00;34m test \e[0m"

Code: Select all

$> echo -e "\e[01;32m test \e[0m"

Code: Select all

$> echo -e "\e[02;32m test \e[0m"

Code: Select all

$> echo -e "\e[00;92m test \e[0m"
Bash tips: Colors and formatting (ANSI/VT100 Control sequences)
ANSI escape code
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

mpz_t
Posts: 18
Joined: 2024-06-14 16:09
Has thanked: 8 times

Re: [Software] xfce-terminal -- some files greyed out

#6 Post by mpz_t »

fabien wrote: 2024-11-20 20:49 Thanks for marking you topic as solved.
mpz_t wrote: 2024-11-20 19:08 dircolors 00;91 changed color to red, how do I change it to white?
How about experimenting a little?

Code: Select all

$> echo -e "\e[00;32m test \e[0m"

Code: Select all

$> echo -e "\e[00;33m test \e[0m"

Code: Select all

$> echo -e "\e[00;34m test \e[0m"

Code: Select all

$> echo -e "\e[01;32m test \e[0m"

Code: Select all

$> echo -e "\e[02;32m test \e[0m"

Code: Select all

$> echo -e "\e[00;92m test \e[0m"
Bash tips: Colors and formatting (ANSI/VT100 Control sequences)
ANSI escape code
I commented out the ".bak" entry in ~/.dircolors and that seems to work.

Post Reply