Colors in console (tty and konsole) gone

Of no fault of my own (as far as I know) the default linux console colors are no longer showing. Both for KDE Konsole and in a tty console. I have not changed any configuration for this. Checking under Konsole profile and it is as it has always been, using Linux colors.

Colors should be black background with white text, with various colors for directories, symlinks, executable, etc.

Perhaps something has changed from a previous update. Maybe I removed a package that was needed for this.

You mean for ‘ls’?
ls’s colorful output is set in /etc/profile.d/ls.bash from the package aaa_base-extras. Do you have that installed?

What does the following output?

alias
echo $LS_OPTIONS

I haven’t change anything with the ls command myself. Don’t know why it should have been changed by the system.


username@machine:~> alias
alias +='pushd .'
alias -='popd'
alias ..='cd ..'
alias ...='cd ../..'
alias beep='echo -en "\007"'
alias cd..='cd ..'
alias dir='ls -l'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -alF'
alias la='ls -la'
alias ll='ls -l'
alias ls='ls --time-style=+"%d.%m.%Y %H:%M:%S"'
alias ls-l='ls -l'
alias md='mkdir -p'
alias o='less'
alias rd='rmdir'
alias rehash='hash -r'
alias unmount='echo "Error: Try the command: umount" 1>&2; false'
alias you='if test "$EUID" = 0 ; then /sbin/yast2 online_update ; else su - -c "/sbin/yast2 online_update" ; fi'
username@machine:~> echo $LS_OPTIONS
-N --color=tty -T 0

With the following command I see colors in Konsole:


ls -l --color=auto

MY fault. I changed the ls command in order to change the time format. This is why the colors where gone.

JFTR, /etc/profile.d/ls.bash sets the following alias:

alias ls='ls $LS_OPTIONS'

But yours was set to:

alias ls='ls --time-style=+"%d.%m.%Y %H:%M:%S"'

, so no colors… :wink:

Edit:
And if you want to change the time format, better just add that option to the LS_OPTIONS variable:

export LS_OPTIONS="$LS_OPTIONS --time-style=+\"%d.%m.%Y %H:%M:%S\""