Fedora Linux Support Community & Resources Center
  #1  
Old 31st May 2008, 03:06 PM
firecrow8 Offline
Registered User
 
Join Date: May 2008
Posts: 7
help dir_colors overriding my preferences

Hi, it seams my terminal has it's own ideas about how to display folders and files with excecutive privilages.

the problem is I keep all my files on an ntfs partition that is mounted with excecutive privilages for all the files so basically whatever I choose for DIR_COLORS is overwritter, or so I"m assuming.

all folders are highlighted in darkgreen even though dark green does not appear anywhere in my $LS_COLORS.

any ideas about where I can find these settings and either turn off the executive highlighting or what color group can control it would be helpful.

Gnome Desktop
Gnome-terminal
Fedora 8

Quote:
[root@laptop ~]# echo $LS_COLORS
no=00:fi=00:di=34:ln=36;00i=40;33:so=00;35:bd=40 ;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:e x=47:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00; 32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31: *.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00; 31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31: *.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*. xpm=00;35:*.png=00;35:*.tif=00;35:

[root@laptop ~]# echo $TERM
xterm

[root@laptop ~]# echo $COLORS
/etc/DIR_COLORS.xterm

[root@laptop ~]# cat /etc/DIR_COLORS.xterm
# Configuration file for the color ls utility
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.

# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty

# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 34 # directory
LINK 36;00 # symbolic link
FIFO 40;33 # pipe
SOCK 00;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to

# This is for files with execute permission:
EXEC 47

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 00;32 # executables (green)
.exe 00;32
.com 00;32
.btm 00;32
.bat 00;32
.sh 00;32
.csh 00;32
.tar 00;31 # archives or compressed (red)
.tgz 00;31
.arj 00;31
.taz 00;31
.lzh 00;31
.zip 00;31
.z 00;31
.Z 00;31
.gz 00;31
.bz2 00;31
.bz 00;31
.tz 00;31
.rpm 00;31
.cpio 00;31
.jpg 00;35 # image formats
.gif 00;35
.bmp 00;35
.xbm 00;35
.xpm 00;35
.png 00;35
.tif 00;35
Reply With Quote
  #2  
Old 31st May 2008, 04:26 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Actually, the file itself tells you.

At the beginning of the file, there are some comments.

# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.[/quote]
So, you should be able to create a $HOME/.dir_colors (note the period in front of dir) to override the defaults.

Last edited by scottro; 31st May 2008 at 06:16 PM.
Reply With Quote
  #3  
Old 31st May 2008, 05:07 PM
firecrow8 Offline
Registered User
 
Join Date: May 2008
Posts: 7
thanks for your instruction. however it does not solve my dilema.
let me clarify

the point is to get
this
Quote:
*.php 00;33
*.txt 00;37
to not be overwridden by this
Quote:
EXEC 00;34
the EXEC class is homogenizing my document types by overiding the colors I use to identify them individually and coloring them only as excecutable.

also I've searched my system and can't find any reason why excecutable directories have a dark green background a search for the string "42" returns no matches in all of the documents with any association to /etc/dircolors or /etc/bashrc
Reply With Quote
  #4  
Old 31st May 2008, 06:24 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Looking at a CentOS box, it seems DIR_COLORS has executables as 32 (bright green) not 42. I suspect you could try simply commenting them out in DIR_COLORS.

Hrrm, that doesn't seem to work, though I haven't tried a reboot.

What I have successfully done in the past, as I use grey backgrounds for my xterminals, making that green very hard to read, is changed the colors in $HOME/.dir_colors.

This is odd though, even commenting out all instances in /etc/DIR_COLORS isn't fixing it. This is odd. (Not that these musings are helpful.)
Reply With Quote
  #5  
Old 8th May 2013, 06:23 PM
LandoCalrissian Offline
Registered User
 
Join Date: May 2013
Location: The GTA
Posts: 2
windows_7chrome
Re: help dir_colors overriding my preferences

OP must have moved on at this point, but in case this helps anyone :

Look at your /etc/DIR_COLORS.xterm file.

To confirm what file is driving the LS_COLORS env var, do the following:
* Look at the contents of your /etc/profile.d/colorls.sh file
* There's a command in the "eval" line, something like: dircolors --sh "$COLORS"
* Echo the content of that env. var: "echo $COLORS". That will tell you what is the file it's actually reading.
Reply With Quote
  #6  
Old 9th May 2013, 07:48 AM
sidebrnz Online
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 64
Posts: 2,598
linuxfirefox
Re: help dir_colors overriding my preferences

Personally, I dislike the colors, partially because you can't get a listing of what color means what unless you know what the codes are. I used to track down where they were assigned and comment that out, but after a few re-installs, I found a better way. In ~/.bashrc, the first line in the user-specific aliases now reads like this:

alias ls=ls

to get rid of it. Why don't you create a little shell script that defines the colors the way you like them and have it run near the end of .bashrc, overriding the defaults? One of the nice things is that it's not going to get smashed by any system update and, as long as you preserve /home, it will survive a new installation as well.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #7  
Old 9th May 2013, 03:35 PM
LandoCalrissian Offline
Registered User
 
Join Date: May 2013
Location: The GTA
Posts: 2
windows_7chrome
Re: help dir_colors overriding my preferences

Well, this workaround is not system-wide, plus I really wanted to learn what was driving the setting of that value in the first place. But yes a .bashrc file is probably the less time-wastey way to go

Quote:
Originally Posted by sidebrnz View Post
Personally, I dislike the colors, partially because you can't get a listing of what color means what unless you know what the codes are. I used to track down where they were assigned and comment that out, but after a few re-installs, I found a better way. In ~/.bashrc, the first line in the user-specific aliases now reads like this:

alias ls=ls

to get rid of it. Why don't you create a little shell script that defines the colors the way you like them and have it run near the end of .bashrc, overriding the defaults? One of the nice things is that it's not going to get smashed by any system update and, as long as you preserve /home, it will survive a new installation as well.
Reply With Quote
Reply

Tags
dircolors, overriding, preferences

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Headphones not overriding speakers shortcut144 Using Fedora 20 3rd August 2009 03:33 PM
Overriding X configuration IanLeonard Using Fedora 3 21st July 2009 08:26 PM
Overriding BIOS vga mode with mach64 driver audiomason Hardware & Laptops 7 9th November 2008 04:11 PM


Current GMT-time: 15:10 (Thursday, 28-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat