 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

19th October 2007, 07:51 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
|
Changing Directory Color
I don't normally ask a question like this but I'm having trouble coming up with good search terms for my problem. In Fedora, I believe I have rendition 6, how do I adjust the directory colors? I do not appreciate the nasty fluorescent green the directory changes to when I make the permissions 777.
I do believe there is a file I have to edit somewhere (probably in /etc) But I don't remember the name as I've never attempted to do this before.
'change directory color fedora' or any other search terms have borne me no fruit. Anyone know how to do this easily?
|

19th October 2007, 08:39 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,922

|
|
|
In Gnome terminal, open 'Edit->Profiles' and edit current one or create new, in the profile options, select 'Colors' tab and tweak to your heart's content.
|

19th October 2007, 08:41 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
|
Ah. OK. Did not think to use the GUI. Is there a way to edit this from the terminal?
|

19th October 2007, 08:58 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,922

|
|
|
Theme details are saved in .gconf/apps/gnome-terminal/profiles/
|

19th October 2007, 09:09 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
|
Ah I see, I guess I wasnt specific enough.
I meant I want to change the directory coloring inside the terminal window, not the gui.
For example, I am logged into my linux fedora machine through SSH Putty session. I make a directory 777. The name of the directory becomes highlighted and green. How do i prevent that from happening? Im not logged into the Gnome terminal or the KDE or anything graphical. This is all command line phenomena.
|

19th October 2007, 10:30 AM
|
|
Clueless in a Cuckooland
|
|
Join Date: Mar 2006
Location: Here now, elsewhere tomorrow.
Posts: 3,922

|
|
|
For session specific settings see `man setterm`, for system wide configuration, they are controlled via /etc/profile.d/colorls.sh (colours themselves are set in /etc/DIR_COLORS and /etc/DIR_COLORS.xterm)
|

19th October 2007, 11:04 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: Ireland
Age: 28
Posts: 92

|
|
Heres a configuration file to use if you use a black background. I find it easy on the eyes.
Code:
# 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 : original line
#COLOR all
# 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 xterm
TERM vt100
# 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 01;34;01 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;37;01 # block device driver
CHR 40;37;01 # character device driver
# This is for files with execute permission:
EXEC 01;37
# 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 01;32 # executables (bright green)
..exe 01;32
..com 01;32
..btm 01;32
..bat 01;32
..tar 01;31 # archives or compressed (bright red)
..tgz 41;01;33
..arj 01;31
..taz 01;31
..lzh 01;31
..zip 01;31
..z 01;31
..Z 01;31
..gz 41;01;33 #gzip - bright yellow on red
..bz2 44;01;33 #bzip2 compression - bright yellow
..lsm 40;01;32 # file description - bright green on black
..info 40;01;32 # file information - bright green on black
..jpg 01;35 # image formats
..gif 01;35
..bmp 01;35
..xbm 01;35
..xpm 01;35
Copy into your home folder and call it .dir_colors.
Its easy enough to mess about with the settings in the file if you want.
|

20th October 2007, 12:21 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
|
I certianly appreciate all the help, however, ive looked at these files and I still cant find out how to prevent the directories from highlighting green when the permissions is 777 .. anyone know where to find this?
|

20th October 2007, 01:19 AM
|
 |
Registered User
|
|
Join Date: Apr 2007
Location: South Dakota
Age: 29
Posts: 505

|
|
|
I think he's talking about when he does an ls command
__________________
If you're not questioning my sanity, I'm not trying hard enough
|

20th October 2007, 01:25 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
Quote:
|
Originally Posted by tw2113
I think he's talking about when he does an ls command
|
Right. When I do an LS -L I see the directories that are 777 as highlighted background .. I dont want that. Its as if its being treated as an executable. And it would almost seem to me as a bug ..
Redhat Enterprise Edition doesnt have this 'feature'. On RHEL the directories that are 777 do not have a highlighting. they remain the normal blue color. Ive compared the colors file and the shell script and they are IDENTICAL. SO .. one might see where I could be confused? Id just like the stupid highlighting to stop. Yes .. It bugs me THAT much.
|

20th October 2007, 01:31 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 3

|
|
|
Hi Matt1776,
check out the "EXEC 01;37" line in the Bman's code example.
J
|

20th October 2007, 01:50 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
Quote:
|
Originally Posted by june3474
Hi Matt1776,
check out the "EXEC 01;37" line in the Bman's code example.
J
|
I did, June. Very carefully I did. That translates to: Executables are BOLD and GREEN in textual color.
This is a very different issue. The directories are HIGHLIGHTING green or yellow depending on the fedora version im looking at. Its a background color. What he has there is exactly the same as what I currently have for my system settings. I dont think that is the problem. But I appreciate the help.
Im really not trying to stymie anyone here, but ive looked at all this and its not the answer to the problem.
|

20th October 2007, 03:03 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Texas
Posts: 354

|
|
|
I don't care for the green backgrounds either, so I played around with dircolors and $LS_COLORS and came up with this:
$ export LS_COLORS="${LS_COLORS}tw=30;00:ow=34;00:"
That seems to do the trick for me. Put it in your ~/.bashrc if you want it to be automatic for every bash shell.
Run dircolors -p to see what the color codes are if you want different colors, backgrounds, or effects.
|

20th October 2007, 03:23 AM
|
 |
Registered User
|
|
Join Date: Oct 2007
Location: Orange County, California
Age: 32
Posts: 31

|
|
Budda,
Thank you, if I dont use your snippet I can always add these lines to my DIR_COLOR file
Code:
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
And modify them to display differently. I had not known these additional configurations were available. This makes it all better. Thanks again and thanks to all who had helped.
|

17th December 2011, 04:01 PM
|
|
Registered User
|
|
Join Date: Dec 2011
Location: Milton Keynes
Posts: 2

|
|
|
Re: Changing Directory Color
A long time later.... but thanks buddha. That helped me too.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 14:28 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|