vote up 0 vote down star

I'm using CentOS 4.8. I like the grey background color and the black foreground color,by which my eyes wouldn't sore.

when I set 'export PS1="\e[0;30m\e[47m\u@\h \w>"' , It only changes the bash prompt line colors.

When I'm editing text via 'vi' or looking up information via 'info',the colors are back to default.

So I'm wondering how to change the background and foreground color globally. thanks for any tip.

updates:

My CentOS is server version, so there is no gui interface.

flag
In the old days, there were several hundred options you could set in your .Xdefaults to customize an xterm. Now it's probably in drop down menus or something boring like that. – Paul Tomblin Dec 17 at 2:56
What terminal application are you using? It's different for different terminals. – ZoogieZork Dec 17 at 2:57
thanks for your replies.I forget to say that I'm using the server version CentOS. – Anonymous Dec 17 at 3:08
2  
You don't say whether you're on the console, using xterm, using something like PuTTY, or if you're using Gnome or KDE and one of their terminals, etc. – Dennis Williamson Dec 17 at 3:59

migrated from stackoverflow.com

1 Answer

vote up 1 vote down

The terminal color is set by a flag on the xterm command (if you're running X of course):

-bg color
This option specifies the color to use for the background of the window. The default is ''XtDefaultBackground.''

-fg color
This option specifies the color to use for displaying text. The default is ''XtDefaultForeground.''
-fn font
link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.