Path: utzoo!attcan!uunet!husc6!mailrus!cornell!uw-beaver!rice!sun-spots-request From: jimc@math.ucla.edu Newsgroups: comp.sys.sun Subject: Re: Dumb terminal screenlength problem Message-ID: <8812092315.AA00778@julia.math.ucla.edu> Date: 20 Dec 88 01:37:22 GMT References: <8811162313.AA08611@scuba.sunfun.eta.com> Sender: usenet@rice.edu Organization: UCLA Mathematics Department Lines: 36 Approved: Sun-Spots@rice.edu Original-Date: Fri, 09 Dec 88 15:15:58 PST X-Sun-Spots-Digest: Volume 7, Issue 62, message 9 of 12 X-Issue-Reference: v7n29 zeke@sunfun.eta.com (Robert K. Scott) writes: >Access for VT100 or H19 style terminal emulation on PCs is through a >...TELNET session on the SUN. The problem for these users is >strange: sometimes their session thinks that they have more than 24 lines >per screen... That's not a bug, that's a feature! Suppose a workstation user starts suntools, and it uses a pseudo-tty for a shelltool (size 34x80). Or he does rlogin to a server from the shellltool or the big screen, getting a ptty on the server. He starts a background job with that ptty as its official tty. He exits. Some poor student attaches via CS-1/Telnet and gets the same ptty. It's still set the way the last guy left it, because his background job is still "using" the ptty. The workaround is to do if ("$TERM" == "network") stty rows 0 columns 0 9600 in each user's .login (or in the system default login script which you set up after suffering through enough of this kind of stuff; tell all the users to source it in their own .login on pain of ...) It assumes that on a Telnet from the CS-1 or otherwise when the incoming terminal type is unknown, telnetd gives you a terminal type of "network" -- some people hack their telnetd for other values. It's important not to do this when a real terminal type is known, as from rlogin or from a smart user-telnet, as the user may be doing rlogin from a Suntools window and you do want the originating window size to propagate. The "9600" catches a similar screwup from dial lines; pttys end up at 300 or 1200 baud and vi only uses part of the screen. Note that there is a bug in stty such that if you do just "rows" it trashes the "columns" setting, so you have to do both. [[ But doesn't that ruin the settings if you really do log in from a (non-standard sized) Sun window? --wnl ]] James F. Carter (213) 825-2897 UCLA-Mathnet; 6608B MSA; 405 Hilgard Ave.; Los Angeles, CA 90024-1555 UUCP:...!{rutgers,ucbvax,sdcrdcf,{hao!cepu}}!ucla-cs!math.ucla.edu!jimc ARPA: jimc@math.ucla.edu BITNET: jimc%math.ucla.edu@INTERBIT