LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2005, 07:02 PM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 31
ls color


OK, I am not actually having trouble to set up anything, it's more like curiosity. I have ls color set up by default, without any .bashrc or .bash_profile added, but ONLY for login shell and for nonroot user.

My question is:
What config file is making difference between this cases? I checked
/etc/profile and it doesn't mention anything of the
'do it for login but not for the other shells' type of stuff.
 
Old 09-11-2005, 08:39 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
/etc/profile is only executed on login shells, I believe. How are you becoming root? 'su'?
 
Old 09-11-2005, 09:39 PM   #3
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by Matir
/etc/profile is only executed on login shells, I believe.
I see. But, if my /etc/profile sets up LS_COLORS and LS_OPTIONS as environmental variables, shouldn't they be available to nonlogin shells?
Here is the only instance where my /etc/profile mentions colors.

# Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
if [ "$SHELL" = "/bin/zsh" ]; then
eval `dircolors -z`
elif [ "$SHELL" = "/bin/ash" ]; then
eval `dircolors -s`
else
eval `dircolors -b`
fi
 
Old 09-11-2005, 10:11 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
They would be available, but I think you need a ls --color alias for them to be used.
 
Old 09-11-2005, 11:04 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Have a look at /etc/DIR_COLORS.
 
Old 09-12-2005, 12:49 AM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
of course read /etc/bashrc if there is one
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Depth, True Color, How to pacranch Amigo 2 04-09-2005 06:16 AM
[COLOR=red]ENCORE WIRELESS PCI Card 802.11b [/COLOR] enrique145 Linux - Hardware 3 07-07-2004 03:31 PM
bsetroot -gradient texture -from color -to color patpawlowski Linux - General 3 02-10-2004 02:51 PM
ls --color 'color change' ekdya Linux - General 1 10-06-2003 04:47 PM
[COLOR=seagreen]HELP-want to use Kickstart/rh7.2 on a notebook[/COLOR] verbali Linux - Newbie 1 05-13-2002 02:59 PM


All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration