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 07-07-2011, 04:46 AM   #1
casualzone
Member
 
Registered: Jan 2010
Posts: 189

Rep: Reputation: 15
read my DIR_COLORS file from my local instead of in /etc/DIR_COLORS


After some search in internet, i know the color setting is in the
/etc/DIR_COLORS
/etc/profile.d/colorls.sh

I have read the DIR_COLORS and copy the file into my local /home/username/.

How could I make the system read my DIR_COLORS file from my local instead of in /etc/DIR_COLORS

I do not have admin access.
 
Old 07-07-2011, 06:03 AM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 496

Rep: Reputation: 213Reputation: 213Reputation: 213
Create a file in your home directory called .dir_colors. Note that it's a hidden file, with a dot in front.

It's explained in the dir_colors manpage, in a terminal, type:

Code:
man dir_colors
 
Old 07-08-2011, 01:00 AM   #3
casualzone
Member
 
Registered: Jan 2010
Posts: 189

Original Poster
Rep: Reputation: 15
i have copied the DIR_COLORS in my .dir_colors in my home directory
make some changes in the DIR_COLORS file

invoke command below:
#dircolors .dir_colors/DIR_COLORS

but no changes is made.
 
Old 07-08-2011, 01:30 AM   #4
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 496

Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by casualzone View Post
i have copied the DIR_COLORS in my .dir_colors in my home directory
make some changes in the DIR_COLORS file

invoke command below:
#dircolors .dir_colors/DIR_COLORS

but no changes is made.
Note that .dir_colors is not a directory, it's a file. Copy DIR_COLORS to .dir_colors in your home directory, then make your changes to .dir_colors.

At startup, .dir_colors is read to create an environment variable called LS_COLORS, which contains the color definition ls uses. In Slackware, this is done by /etc/profile.d/coreutils-dircolors.sh.

Running the program dircolors (with an optional file) will return a string that can be used to set the LS_COLORS variable. Usually you don't have to run it, only edit .dir_colors, log out and log back in, that should do it.
 
1 members found this post helpful.
Old 07-18-2011, 08:19 PM   #5
casualzone
Member
 
Registered: Jan 2010
Posts: 189

Original Poster
Rep: Reputation: 15
thank you very much
it works!!
 
  


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
/etc/DIR_COLORS[.xterm] help unixshell101 Linux - Software 1 12-27-2007 11:26 AM
.dir_colors help unixshell101 Linux - Software 2 12-26-2007 05:48 PM
DIR_COLORS messages stealth886 Linux - Software 0 11-06-2007 06:10 PM
$HOME/.dir_colors ignored?? registering Mandriva 2 05-31-2004 05:24 PM
Dir_colors twk Linux - General 1 05-07-2003 01:09 PM


All times are GMT -5. The time now is 12:53 PM.

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