SUMMARY: Inverse Screen on Sun Terminal

From: Anthony Yen (
Date: Fri Feb 14 1992 - 17:27:56 CST

First of all, thanks to all who replied! The responses came from:

John Hasley<>
Claus Assmann <>
Brent Alan Wiese <>
Michael Assels <>
James J Dempsey <>
Gustavo Vegas <> (Luis Fernando V. Gomes)
chuck@mustang (Chuck Yerkes)
kalli!kevin@fourx.Aus.Sun.COM (Kevin Sheehan {Consulting Poster Child})
"Andrew Luebker" <> (Brent Chivers) (Ralph Merwin) (John M. Blasik) (Matthew Donaldson)
Robert L Krawitz <rlk@Think.COM>
Hugo Becker <griffin!>
Richard Kurtz <> (Todd S. Antonson) (Doug Neuhauser)
Steve Riley <pacacc!steve@sacto.West.Sun.COM>
Mike Raffety <> (Timothy Baum 432-2765)
John Valdes <>
bks@vangogh.CS.Berkeley.EDU (Brian K. Shiratsuki)
Frank G. Fiamingo <>

The answer:

The FM is console (4). The sequence suggested varied:

ESC[0m for normal text, ESC[7m for inverted display (didn't work on my SPARCs)
ESC[p for normal text, ESC[q for inverted display (worked on my SPARCs) (Ralph Merwin) pointed out:

        Don't know for sure about the Sun term, but the VTxxx series use
        <esacpe>[?5h to set reverse video, and <escape>[?5l for normal video.

These don't work on my SPARCs. Mike Raffety <> pointed me
to termcap(5):

>From the termcap(5) man page:

          se str end standout mode
          so str begin standout mode

So, to begin standout mode (inverse), do an escape, left square bracket,
digit 7, lowercase m ("\E[7m"), and to end standout mode (inverse), do
an escape, left square bracket, lowercase m ("\E[m").

Frank G. Fiamingo <> wrote:

Check the manpage for gettytab(5). I use the default entry:

        :ap:lm=\E[q\r\n%h login\72 :sp#9600:\
        :im=\r\nACS Workstation Lab\n:

to invert the screen on my workstation.

For end users, directions varied:

echo "^[[p" > /dev/console # black characters on a white background
echo "^[[q" > /dev/console # white characters on a black background
# The ^[ is the single character generated by the Esc key. It's a bit tricky
# to type it on the command line; you must type CTRL-V Esc.
(I discovered that you didn't have to redirect this to /dev/console.)

alias black 'echo -n "^[[q"'
alias white 'echo -n "^[[p"'

$ echo '\033[q' # Note how this neatly sidesteps having to use ^V

Thanks again to all who replied!

Anthony Yen - ... Sail tough
SPARC SysAdmin - UT/Austin - Economics or go home ... Kowabunga! ...

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:36 CDT