Xref: utzoo comp.sys.att:8192 comp.unix.questions:18147 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.sys.att,comp.unix.questions Subject: Re: Escape codes and colors in AT+T SysV. Message-ID: <1989Dec3.025200.26143@virtech.uucp> Date: 3 Dec 89 02:52:00 GMT References: <8@dynasys.UUCP> Organization: Virtual Technologies Inc. Lines: 31 In article <8@dynasys.UUCP>, jessea@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 | +-----------------------------------------------------------------------+