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 07-07-2011, 03: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, 05:03 AM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
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, 12: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, 12:30 AM   #4
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 515

Rep: Reputation: 234Reputation: 234Reputation: 234
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, 07:19 PM   #5
casualzone
Member
 
Registered: Jan 2010
Posts: 189

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


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

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

All times are GMT -5. The time now is 02:49 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