[net.unix-wizards] tset vt100 destroys scrolling on SUN-2/120

thisted@gargoyle.UUCP (Ronald Thisted) (10/22/85)

We have discovered that accidentally doing a "tset vt100" from
our SUN consoles screws up their scrolling (and vi, and more, and....)
The problem is due to the initialization string sent to the
console (ESC[1;24r).  We have not been able to reinitialize the console
to its virgin state without rebooting (ugh!).  Is there a nice
solution, and if so, is it documented anywhere?

Thanks,
Ron Thisted
Department of Statistics, The University of Chicago
MAIL:	5734 University Avenue, Chicago, IL 60637
UUCP:	ihnp4!gargoyle!galton!thisted
CSNET:	thisted@galton.UChicago.csnet

brian@sdcsvax.UUCP (Brian Kantor) (10/24/85)

In article <221@gargoyle.UUCP> thisted@gargoyle.UUCP (Ronald Thisted) writes:
>We have discovered that accidentally doing a "tset vt100" from
>our SUN consoles screws up their scrolling (and vi, and more, and....)
>The problem is due to the initialization string sent to the
>console (ESC[1;24r).  We have not been able to reinitialize the console
>to its virgin state without rebooting (ugh!).  Is there a nice
>solution, and if so, is it documented anywhere?

In the list of commands that the SUN terminal emulator groks is a note
that the sequence <ESC[s> will reset the terminal to a sort of virgin
state.  Especially useful is that it undoes the set-scrolling-area
limit of 24 lines that your vt-100 tset did.  Stick it in the
initialization or reset string for the Sun termcap.  Or you could put an
explicit set to 34 lines in the Sun termcap with <ESC[1;34r>.

	Brian Kantor	UC San Diego

	decvax\ 	brian@ucsd.arpa
	akgua  >---  sdcsvax  --- brian
	ucbvax/		Kantor@Nosc 

guy@sun.uucp (Guy Harris) (10/27/85)

> >We have discovered that accidentally doing a "tset vt100" from
> >our SUN consoles screws up their scrolling (and vi, and more, and....)
> >The problem is due to the initialization string sent to the
> >console (ESC[1;24r)....
> 
> In the list of commands that the SUN terminal emulator groks is a note
> that the sequence <ESC[s> will reset the terminal to a sort of virgin
> state.  Especially useful is that it undoes the set-scrolling-area
> limit of 24 lines that your vt-100 tset did.

The SUN console/terminal emulator don't interpret <ESC>[N;Mr as a
VT100-style "set scrolling region" command - that escape sequence is in the
series reserved by X3.64 for private escape sequences, and "set scrolling
region" is DEC-private.  The escape sequences are documented in the Sun UNIX
2.0 manual page CONS(4S), where it also says

	The Sun terminal emulator and the VT100 are *not* compatible
	in any true sense.  (Italics in the original).

<ESC>[Nr is "set scrolling" (SUNSCRL), which takes one parameter, default 0.
It "sets to N an internal register which determines how many lines the
screen scrolls up when a line-feed function is performed with the cursor on
the bottom line".  An N of 1 is the normal mode; N of the screen size causes
the screen to clear instead of scrolling; N of some small value >1 causes
the screen to jump a bit when scrolling.  N of 0 causes the console, but not
the SunWindows terminal emulator, to move the cursor to the top line without
scrolling; the top line is cleared, but the screen is otherwise unchanged.

	Guy Harris