LinuxQuestions.org
Visit Jeremy's Blog.
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 06-13-2010, 02:55 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 386

Rep: Reputation: 30
Color in terminal - Fedora


I am using fedora and use "terminal" for command line activities.

When I list using ("ls"), Fedora displayed folder with different font color and sometimes highlighted the name. I found the setting in
/etc/DIR_COLORS and is able to change the settings and see the changes.

However, there is one type of folder that has font and background highlight very similar color. it is very hard to see the name and I couldn't find any setting that fix it (removing background color).

I noticed that the folder with this problem has "chmod 777" permission.

Can someone suggest what entry of the DIR_COLORS I should modify to change the background highlight to something else like underscore.
Attached Thumbnails
Click image for larger version

Name:	color_terminal.JPG
Views:	402
Size:	61.2 KB
ID:	3835  
 
Old 06-13-2010, 03:20 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The folders you are concerned about are symbolic links. In /etc/DIR_COLORS, look for something like this:
LINK 00;36 # symbolic link

Change the 00;36 to the colors you prefer.
 
Old 06-13-2010, 03:48 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Actually the attached image does not match the spell:
Quote:
However, there is one type of folder that has font and background highlight very similar color. it is very hard to see the name and I couldn't find any setting that fix it (removing background color).

I noticed that the folder with this problem has "chmod 777" permission.
It is not clear to what directory this comment is related... actually there is no directory in the list shown! I can only guess you refer to directories that have all permission bits set, like those ones stored on a FAT or NTFS filesystems, e.g.
Code:
$ ls -ld testc
drwxrwxrwx 2 colucix users 4096 Jun 13 22:20 testc
The reason for the green background is due to the bit "writable by others" or "o+w" and the flag which controls this behaviour is OTHER_WRITABLE. However this control is not set in /etc/DIR_COLORS but you can always add it. For example, if you want them in blue text and underlined:
Code:
OTHER_WRITABLE 04;34 # dir that is other-writable (o+w) and not sticky
I really don't know where actually these and other settings are stored, but the dircolors man page clearly states that if no file is specified as argument "a precompiled database is used". Maybe this database is stored in the binary executable of the dircolors command itself, but it can always be overridden by settings in /etc/DIR_COLORS or better by $HOME/.dir_colors (for your own personal settings).

Finally, you can see the complete set of colorized items using:
Code:
dircolors -p
Hope this helps.
 
  


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
how could i open new terminal with X color ? DoME69 Linux - Newbie 2 02-12-2008 03:03 AM
Terminal color m2azer Linux - General 3 02-10-2007 12:22 AM
Fedora Core 4 Terminal Color placster Linux - Newbie 7 12-14-2005 02:12 PM
Terminal font and color berkay Linux - Newbie 10 09-23-2004 02:19 AM
get terminal color? cratos Programming 0 07-16-2003 03:04 PM

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

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