Escape codes and colors in AT+T SysV.
Conor P. Cahill
cpcahil at virtech.uucp
Sun Dec 3 13:52:00 AEST 1989
In article <8 at dynasys.UUCP>, jessea at dynasys.UUCP (Jesse W. Asher) writes:
> I recently installed AT+T Unix SysV/386 3.2 and read in the manual how
> you can change the screen attributes through escape codes. I have no idea
> how these work, however, and the manual only said that you use the unix escape
> sequence ([) and then the qualifier. I've tried various ways and none seem
> to work. Another aspect I'm interested in is changing the background and
> foreground colors. I'm tired of black and white. Can anyone out there explain
> how this works? Thanx in advance for any help.
You can do this from the shell (or your .profile) with the following:
echo "\033[XXm"
Where
XX is the color/attribute specification. See display(7) for a
complete list of what colors and/or attributes can be used.
While this does work at setting the color attributes, it does not
provide a satisfactory implementation because it doesn't cause the entire
screen to be colored. Only characters output after that sequence are in
the specified color. Another problem is that many programs (like vi) clear
the color/attributes by sending an \033[0m at startup time.
Most of the time people set thier colors in the shell command prompt so that
the colors are set/restored each time the prompt is displayed.
--
+-----------------------------------------------------------------------+
| Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 !
| Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 |
+-----------------------------------------------------------------------+
More information about the Comp.unix.questions
mailing list