[comp.sys.sun] Jumping screen

simon@summer.british-telecom.co.uk (Simon E. Redding) (07/18/89)

Our SUN 3/60 consoles have a nasty habit of scrolling in a jump fashion -
i.e. when you get to the bottom, the screen scrolls about 20 lines.  This
is really annoying when using man.  The only way we have found to stop
this is a fastboot.  Any help?

Disclaimer: I'm a hedgehog (ignore me, don't squash me :-)

Simon@uk.co.bt.summer

iang@dartvax.dartmouth.edu (Ian Gregory) (07/28/89)

In article <269@brazos.Rice.edu> simon@summer.british-telecom.co.uk (Simon E. Redding) writes:
>X-Sun-Spots-Digest: Volume 8, Issue 77, message 6 of 21
>
>Our SUN 3/60 consoles have a nasty habit of scrolling in a jump fashion -
>i.e. when you get to the bottom, the screen scrolls about 20 lines.  This
>is really annoying when using man.  The only way we have found to stop
>this is a fastboot.  Any help?

Yes, I can help with this, and also with another problem which was posted
a little while ago, about getting the console back to black on white when
it has been set to white on black.

The short answer is to say "LOOK AT MAN CONSOLE(4S)"

But to save you the trouble, I will go on to say that these things can be
controlled using:

     ESC[p       Black On White (SUNBOW)
     ESC[q       White On Black (SUNWOB)
     ESC[#r      Set scrolling (SUNSCRL)

And also:

     ESC[s       Reset terminal emulator (SUNRESET)
          Takes no parameters.   Resets  all  modes  to  default,
          restores  current  font  from  PROM.

Issuing a SUNRESET sets the console back to the state it is in immediately
after booting, but only takes a fraction of a second.  This seems to be
exactly what you need, and can be done using the command:

echo "ESC[s" > /dev/console    (hit the escape key, don't type E S C)

I hope this helps,
                  Ian Gregory
                  iang@plasmoid.dartmouth.edu

robinson@uncmed.med.unc.edu (Gerard A. Robinson) (07/28/89)

My experiences with this 'jumping' indicate that it happens when I've
logged into some other system that by default sets the terminal to vt100,
and the initialization sets the scrolling region.  One solution I've found
is to reset it on the Sun with:

echo '^[[1;1r'

guy@uunet.uu.net (Guy Harris) (07/29/89)

>Our SUN 3/60 consoles have a nasty habit of scrolling in a jump fashion -
>i.e. when you get to the bottom, the screen scrolls about 20 lines.  This
>is really annoying when using man.  The only way we have found to stop
>this is a fastboot.  Any help?

>From CONSOLE(4S):

     ESC[#r      Set scrolling (SUNSCRL)
          Takes one parameter, #  (default  0).   Sets  to  #  an
          internal  register  which determines how many lines the
          screen scrolls up when a  line-feed  function  is  per-
          formed with the cursor on the bottom line.  A parameter
          of 2 or 3 introduces a small amount of ``jump'' when  a
          scroll  occurs.   A  parameter  of 34 clears the screen
          rather than scrolling.  The initial  setting  is  1  on
          reset.

          A parameter of zero initiates ``wrap mode'' instead  of
          scrolling.   In  wrap mode, if a linefeed occurs on the
          bottom line, the cursor  goes  to  the  same  character
          position  in  the  top  line  of  the screen.  When any
          linefeed occurs, the line that the cursor moves  to  is
          cleared.   This  means  that  no scrolling ever occurs.
          `ESC [ 1 r' exits back to scroll mode.

          For more information, see the description of the  Line-
          feed (CTRL-J) control function above.

If you get any behavior from the console that you can't seem to fix except
by rebooting, check out CONSOLE(4S)'s "SUNxxx" escape sequences - you may
have just put the console PROM code into some funny mode with such an
escape sequence.  (Note that the SUNSCRL escape sequence is has the same
final character as the DEC escape sequence to set the scrolling region -
Sun consoles are *!NOT!* VT100s, so don't run software on them that thinks
they are!  The <ESC>[xxxr sequence is in the range of "private" escap
sequences specified by X3.64, so while both the VT100 and Sun console
claim to be X3.64 conformant, they can still have those sequences do
different things.  It might have been nice had the Sun console been
VT100-compatible, but what's done is done....)

The earlier problem with the screen going into white-on-black mode was
probably similar - there are escape sequences for that as well.

taft@uunet.uu.net (Mike D. Taft) (08/04/89)

In article <269@brazos.Rice.edu> simon@summer.british-telecom.co.uk (Simon E. Redding) writes:
>Our SUN 3/60 consoles have a nasty habit of scrolling in a jump fashion -
>
>Simon@uk.co.bt.summer

What we do on our SUNs is " echo '<ESC>[1r' <ret>" .  This usually fixes
the problem.  



Mike Taft -- Sys Admin
Honeywell, Inc., Marine Systems Division
6500 Harbour Heights Parkway M/S 4E8     ...uunet!nwnexus!grouch!taft
Everett, WA  98204-8899                    taft@grouch.hywlmsd.wa.com

#include <stddisc.h>

spage@apple.com (08/31/89)

The console tty driver implements some ANSI escape sequences for setting the
jump.  Read CONS(4S), they're something like <Esc>7r.  So, resetting the
terminal with `reset` or `echo escape_sequence` should do the trick.

=S