
Changing terminal's *normal* color scheme?"
Louis J. LaBash Jr. (lo...@LCJones.aclib.siue.edu) wrote:
: Hi,
: I have the need to change my terminal's (text-mode) normal colors
: to white text on blue background. Using "setterm" does the above;
: but it's impermanent. Programs using ncurses upon exit reset the
: terminal to normal, which is white-on-black: this is *not* what
: I want.
: Any and all help will be appreciated.
Well, assuming you're using BASH as your shell, you could set the
colors of your prompt (via the PS1 and PS2 environment variables) using
ANSI color escape characters.
For example, to have all your text at the shell prompt display in
white on blue, you could do something like this:
export PS1="\033[0;37;44m"
The "\033" is the octal code for the ESCape character (ASCII 27). The
"[0;37;44m" part is the ANSI code to change the color to normal attribute
(0), white foreground (37), and blue background (44). The "m" is the
color command, I suppose. I have the ANSI codes in the back of my old
MS-DOS manual.
This is assuming, also, that you have your terminal set to a
terminal that understands ANSI escape sequences. The default, Linux (in
SlackWare, anyways), supports them.
--
===============================================================================
Arcadio Alivio Sincero, Jr.
Sophomore, Computer Science Major at the University of Maryland at College Park
Amateur competitive bodybuilder
Email: l...@wam.umd.edu, WWW: <coming soon to a web site near you!>
"D.A.R.E. .... to keep cops off donuts."