[Techtalk] Console or Terminal Colors
ktb
x.y.f at home.com
Tue Sep 25 23:21:45 EST 2001
On Tue, Sep 25, 2001 at 09:11:29PM -0400, Phil Savoie wrote:
> Hi All,
>
> Could anyone help with how to change the background and forground (text)
> colors in either the terminal or console on RH6.2? The idea is to set it up
> so that on tty1 bg red fg black, tty2 bg cyan fg black, etc.
I haven't tested this but would try something like the following in
your ~/.bash_profile or /etc/profile -
----------------------------------------------------
cons=`tty`
case "$cons" in
/dev/tty1)
setterm -background red -foreground black
;;
/dev/tty2)
setterm -background cyan -foreground black
;;
esac
-----------------------------------------------------
Check the man page for setterm as there are various options to clear the
screen and so forth that might be of interest to you.
hth,
kent
--
"The significant problems we face cannot be solved at the
same level of thinking we were at when we created them."
--Albert Einstein
More information about the Techtalk
mailing list