Bug 38370

Summary: ls should not use --color=tty unless .dircolors is present
Product: [Retired] Red Hat Linux Reporter: Bob Proulx <bob>
Component: fileutilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-30 07:13:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bob Proulx 2001-04-30 07:13:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.18 i686)


Redhat imposes a default --color=tty option alias on ls commands by
default.  That is
undesireable.  You can't predict what foreground and background colors the
user is
going to be using and therefore many default color combinations will be
unreadable. 
Also, this behavior is imposed upon a user in the global /etc/profile.d
startup whether
the user would want this or not.  That is not desireable.

Redhat has configured it to be possible to disable colorization by adding a
.dircolors
file in the user's home directory and configuring this to be "COLOR none"
but 
that means that if you don't want this breakage you have to ask to get
better behavior?
That is also undesireable.  It would be best to have normal ls behavior by
default and
turn colorization on if and only if the user requests it, possibly by
having the .dircolors
file in their home directory, as before.  That would maintain compatibility
with all users
that have specified colors to be used but would prevent this breakage when
it is not
desired to have colorization.

At the very least the files in /etc/profile.d should be separated into an
additional
package such that it could be individually removed or avoided.  In the
general
case avoided.


Reproducible: Always
Steps to Reproduce:
1. log in
2. ls


Actual Results:  The /etc/profile.d/colorls.sh file was sourced and aliases
for ls defined which
included the --color=tty option.

Expected Results:  I expected ls to behave in the traditional manor WITHOUT
color.  This is
also the default GNU behavior.  Only Redhat has this imposed breakage.

Comment 1 Bernhard Rosenkraenzer 2001-04-30 13:06:20 UTC
It's not a bug, it's a feature, because most users find the colorized output 
more readable.
If you don't like it, echo "unalias ls" >>~/.bashrc