Using color on text based RH Monitor

Thierry ITTY thierry.itty at besancon.org
Fri Jun 3 10:38:31 UTC 2005


A 10:06 02/06/2005 -0400, vous avez écrit :
>We have a single User, text based RH9 workstation with a 
>color monitor.  We would like to use field attributes to 
>cause our screen data and prompts to display in color 
>instead of black and white.  For instance DIM would display 
>black text on a grey background, BRIGHT would display light 
>blue text on a grey backgound, etc (using UNDERLINE, REVERSE 
>VIDEO attributes.  Is this possible, and if so, how can be 
>do it?

on text monitors/screens attributes are set with escape sequences
usually attributes allow bold, underline, reverse video, and color (7 light
and 7 dark)
escape sequences depend on the terminal model (see "termcap") but most
support the standard ascii or vt100 (export TERM=xxx)
some tools/distributions include colouring when in text mode (ls, vi with
syuntax highlighting, aso) but if you want to design your own screens you
will have to write your own routines
example :

echo -e $"\t\tWelcome to \\033[0;31mRed Hat\\033[0;39m System"

will display "Red Hat" in red and the remainder in white

hth

			- * - * - * - * - * - * -
Bien sûr que je suis perfectionniste !
Mais ne pourrais-je pas l'être mieux ?
	Thierry ITTY
eMail : Thierry.Itty at Besancon.org		FRANCE





More information about the redhat-list mailing list