[comp.sys.sun] Termcap problem on a Sun 3

rja@edison.GE.COM (rja) (05/17/89)

I regularly use a Sun-3 via an Internet TAC (terminal access controller).

The first thing I do when logging in is to reset the terminal type to a
vt100 so things will work correctly. (in ksh: export TERM=vt100 )

Sometimes but not always the Sun gets into a weird state where it believes
that a vt100 has only 7 lines.  The terminal is OK because I've reset it
when this happens and the problem continues.  The termcap entry is also
fine indicating a vt100 as an 80x25 terminal.  I haven't typed the letter
o in place of the number 0.  The machine is a diskfull server so I don't
suspect a network problem.  The OS is around rev 3.5 on the Sun-3.

If anyone has good ideas on what the problem might be or how to diagnose
it further, I'd love to hear from you.   I'll summarise to the net any
responses I get.  I am not that systems' admin, so I can only perform
user-level debugging/diagnosing.

  rja@edison.cho.ge.com   OR (if you must) ...uunet!virginia!edison!rja

casey@gauss.llnl.gov (Casey Leedom) (05/26/89)

| From: rja@edison.GE.COM (rja)
| X-Sun-Spots-Digest: Volume 7, Issue 300, message 14 of 15
| 
| I regularly use a Sun-3 via an Internet TAC (terminal access controller).
| Sometimes but not always the Sun gets into a weird state where it believes
| that a vt100 has only 7 lines.

The kernel maintains two variable describing the number of rows and
columns of the tty.  You can see what it thinks these values are by ``stty
all''.  You can change those values by ``stty rows ### cols ###''.

These kernel variables are normally initialized to zero by login(1), but
an incoming rlogin can provide window size information which rlogind(8)
will use to initialize these variables.  Tset(1) will also initialize
these variables from their corresponding termcap values ("li" and "co") if
the kernel variables are zero.

When most applications start up they interogate the kernel for what it
thinks the window size is, and if either of those values are zero, the
applications use the corresponding values from termcap.

Casey

rja@edison.GE.COM (rja) (06/09/89)

Earlier I had posted a message describing a problem where the Sun I use
would in mid-session begin to believe that my vt100 had 7 lines instead of
25.

The unanimous answer from Sun-Spots folk was that the solution was to type
"stty" to reset it so that the termcap values would again be used.  This
seems to solve the problem, although I still don't know how to prevent it
from arising...

The reason that tty became confused is still unclear, although it might
relate to another process leaving the pty in a bizarre state (according to
one responder).

Thanks to all for the help.

-------------------------------------------------------------------------------
Internet (vastly preferable):   rja@edison.cho.ge.com
UUCP     (if you must)      :  uunet!virginia!edison!rja
-------------------------------------------------------------------------------