LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 06:02 PM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 32
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, 07:39 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

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

Original Poster
Rep: Reputation: 32
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, 09:11 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

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

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

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


Reply



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 05:16 AM
[COLOR=red]ENCORE WIRELESS PCI Card 802.11b [/COLOR] enrique145 Linux - Hardware 3 07-07-2004 02:31 PM
bsetroot -gradient texture -from color -to color patpawlowski Linux - General 3 02-10-2004 01:51 PM
ls --color 'color change' ekdya Linux - General 1 10-06-2003 03:47 PM
[COLOR=seagreen]HELP-want to use Kickstart/rh7.2 on a notebook[/COLOR] verbali Linux - Newbie 1 05-13-2002 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 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
Open Source Consulting | Domain Registration