How to permanently save the color settings in terminal.app

Hi,

I have configured the "ls" command in the terminal.app to give colored outputs. However, I realised that for some reason the color-set used is designed for a light-colored background. When I use "white on black", the default blue color of the directories is almost invisible.

Of course, I can change this to another color, but this problem is true for all "blue" fonts, so for example, the default color for comments in vim is also blue and thus unreadable with black background.

This is not a problem when I use the xterm in X11. The color set there is much lighter and is perfect for a black backgound.

By drag-and-drop method (drag the chosen color on top of the directory texts in terminal), I am able to alter the blue color to a much lighter version. This apparently changes all fonts that is blue (this includes for example vim comments), and is exactly what I wanted. But I cannot figure out a way to save this as default. Clicking "Save setting as default" button in the inspector does nothing, the new terminal window still gives you this dark blue.

Anyone know how do I do this?

Cheers,

Lianheng

Powerbook G4 12", Mac OS X (10.4.8)

Posted on Feb 14, 2007 12:04 PM

Reply
6 replies

Feb 14, 2007 1:53 PM in response to tong

to set the color for the 'ls' command see the manpage for ls. there is
a LSCOLORS env. var. To make the change more or less permanent, you'll
need to put this in your ~/.bashrc or ~/.bash_profile file. This though assumes that you're using bash for your shell.

LSCOLORS The value of this variable describes what color to use
for which attribute when colors are enabled with
CLICOLOR. This string is a concatenation of pairs of the
format fb, where f is the foreground color and b is the
background color.

The color designators are as follows:

a black
b red
c green
d brown
e blue
f magenta
g cyan
h light grey
A bold black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background

Note that the above are standard ANSI colors. The actual
display may differ depending on the color capabilities of
the terminal in use.

vim set the colors elsewhere. probably in the ~/.vimrc file

Feb 15, 2007 7:22 AM in response to tong

drag the chosen color on top of the directory texts in terminal


I didn't know this. Where did you find this?

But, yes, it seems the settings can't be saved as default.

You may try TerminalColors. This will add a new pane to the Terminal Inspector to set each of the ANSI colors. You can set default colors by pushing "save this as default", or save the settings in a file by selecting "Save As..." from the "File" menu.


PowerMacG4, PowerBookG4, iMac(C2D) Mac OS X (10.4.8)

Feb 15, 2007 7:51 AM in response to Nils C. Anderson

Hi Nils,

Thanks for the replies.

I think I see what the problem is: basically the colors in the terminal are darker than that of the xterm in X11. This can be clearly seen from the vim. May be this is to do with the fact that apple terminal.app has a "better" color support?

I quite like the default LSCOLORS settings, which is:

LSCOLORS=exfxcxdxcxegedabagacad

The color settings in X11 is just perfect for me at the moment. It would be so much nicer if I can make the color scheme in terminal.app look like that of the X11. If say, I change LSCOLORS to

LSCOLORS=gxfxcxdxcxegedabagacad

and change the color schemes in vim to a lighter theme, but this will effect the colors in X11 too, which is perfect now. Cyan will look too light in X11.

At the first I thought by drag and dropping the colors into terminal it will alter its color map. So my question was actually how can one (if it is possible) change the color map of the terminal.app, so that it inteprets the ANSI "blue" slightly differently.

By the way, the way that you can see all colors in vim is really neat! Thanks for that tip.

Cheers,

Lianheng

Mar 13, 2007 1:27 PM in response to Nils C. Anderson

So, what do you do if you run the colortest and the "dark" colors are the same as the "light" colors. I am using xterm-color and Terminal and have the TerminalColors addon installed. It looks like the "light" colors are set up properly but Terminal just won't use them.

It looks like:

http://www.ruht.ro/uc/terminal.png

I want it to look like:

http://www.ruht.ro/uc/glterm.png

Oh, and the colors show up perfectly in GLTerm. I am going to be getting an Intel-based mac, and GLTerm won't work on Intel afaik.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to permanently save the color settings in terminal.app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.