[Techtalk] Console or Terminal Colors

Phil Savoie p_savoie at sympatico.ca
Wed Sep 26 00:57:59 EST 2001


Thank you Kent as this did the trick!

Regards,

Phil

On Wednesday 26 September 2001 00:21, ktb wrote:
> 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




More information about the Techtalk mailing list