PDA

View Full Version : [gnome] .dircolors



PocketHercules
March 10th, 2011, 06:10 PM
How do I define a custom color that I can use in .dircolors instead of using the canned attribute color codes. For example, I want to define a light blue, which is not available as one of the canned codes. How can I define this color for .dircolors to use? Is this even possible?

Frogs Hair
March 10th, 2011, 08:23 PM
There is a man page for dircolors . I found some guides in my search , but they were old , 2005 vintage .

PocketHercules
March 11th, 2011, 12:45 AM
Yeah, I checked this out...it doesn't seem to have the information I am requesting.

PocketHercules
March 11th, 2011, 03:06 PM
Robert008 et. al.,

Thanks for the steps. What is really unclear to me is how to define a new color. For example, pretend I want to define a color called fireenginered. Presumably, I need to define some RGB values somewhere in some format to identify my color by name and associate it with the RGB values. My question really asks how do I create this new color name (or symbolic number as like other colors in .dircolors), what is the method for assigning for RGB values to it, and what file does this definition get put in (.dircolors?)? Once I have the color, I know how to use it in dircolors.

Frogs Hair
March 11th, 2011, 03:42 PM
Here is the guide I wrote about . http://ubuntuforums.org/showthread.php?t=41538

gmargo
March 11th, 2011, 05:25 PM
Colors are not defined in the .dircolors file. The values in that file, or in the $LS_COLORS environment variable, specify offsets into a table of colors. That table of colors is controlled by the terminal software you're using.

Both gnome-terminal (default for Gnome) and konsole (default for KDE) allow for configuration of the color palette they use through their respective menus. xterm allows configuration through the .Xresources file.

gnome-terminal supports 16 colors, configurable through it's menu: Edit -> Profile Preferences -> Colors. The "Color palette" shows the current colors and allows modification.

konsole supports 256 colors, but only the first 16 are configurable through the gui menu: Settings -> Configure Profiles -> Shell (or alternate configuration) -> Edit -> Appearance -> Color Scheme & Background -> Edit. I'm not sure how to modify the other colors.

xterm supports 256 colors. At least the first 16 are configurable through X resources. Reference /etc/X11/app-defaults/XTerm-color.

Hopefully this information is correct, but I may be off. Corrections welcome.

PocketHercules
March 11th, 2011, 06:17 PM
In tmllvs response, I see that he setup a color brown (which is not a standard color). From what I can tell, all he did was add the following lines to the end of his .dircolors file.

.red 00;31
.green 00;32
.yellow 00;33
.blue 00;34
.magenta 00;35
.cyan 00;36
.blueb 01;34
.blueu 04;34
.bluebi 05;34
.bluer 07;34
.brown 00;33 <<<< isn't this yellow?
.blackb 01;30
.redb 01;31
.yellow 01;33
.magentab 01;35
.cyanb 01;36
.gray 00;37
.greenb 01;32
.java 00;32
.c 00;33
.cpp 00;36

Just for giggles, I added this to the end of my .dircolors file and added the line ".v 00:33" after this. When I went through the steps related to my .bashrc...even started a new shell... I did not see that .v files were brown. Instead, they were yellow, which is what the color represented by code 33.

It appears that I am pretty dense when it comes to what I am being told to do. Either I am not understanding what is being described, or it isn't there.

-Rob

PocketHercules
March 11th, 2011, 06:19 PM
My last reply did not take into account gmargo's response...need to process it before posting again.