home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 15802 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  3.5 KB

  1. Path: sparky!uunet!know!mips2!news.bbn.com!usc!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!uknet!mcsun!news.funet.fi!hydra!klaava!klaava!liljeber
  2. From: liljeber@hydra.Helsinki.FI (Mika Liljeberg)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: linux-0.98.3 termcap problem
  5. Message-ID: <LILJEBER.92Nov5222226@hydra.Helsinki.FI>
  6. Date: 5 Nov 92 20:22:26 GMT
  7. References: <1992Nov1.004828.6310@afterlife.ncsc.mil><1992Nov1.101439.10943@klaava.Helsink
  8.     i.FI>
  9.     <1992Nov1.144417.25896@wam.umd.edu><1992Nov1.172235.21007@klaava.Helsinki.FI>
  10.     <92308.071727NU013809@NDSUVM1.BITNET>
  11. Sender: news@klaava.Helsinki.FI (Uutis Ankka)
  12. Organization: Department of Computer Science, University of Helsinki, Finland
  13. Lines: 62
  14. In-Reply-To: NU013809@NDSUVM1.BITNET's message of 3 Nov 92 13: 17:27 GMT
  15.  
  16. In article <92308.071727NU013809@NDSUVM1.BITNET> NU013809@NDSUVM1.BITNET (Greg Wettstein) wrote:
  17. > Speaking of TERMCAP problems I am wondering if anyone has noticed this yet.
  18. > According to the discussions here and on the mailing list I decided to
  19. > always refer to our Linux machines as VT220's when I logged onto other
  20. > systems which use TERMCAP style entries.  console is great for Linux but of
  21. > course unknown to other systems.
  22. > After logging into a couple of systems I suddenly noticed that the virtual
  23. > console was restricting itself to 24 lines.  For example if less is used
  24. > to view a file and the sh prompt is on the bottom line of the screen the
  25. > entire output gets displayed on the bottom line of the screen.  Using
  26. > less with the prompt at the top of the screen causes less to use the
  27. > console as if it had 24 lines.
  28.  
  29. Yes, this is because the remote host _knows_ a VT220 has only 24
  30. lines.  The reset (rs) or initialization (is) string in the remote
  31. host's termcap probably does something like this: "\E[1;24r". This
  32. sets up the vtxxx scrolling region. 24 lines. Ugh.
  33.  
  34. I usually handle this problem by putting the following line into my
  35. .login (on the remot host, of course):
  36.  
  37. eval "`resize`"
  38.  
  39. Resize comes with X11. It resets the scrolling region, finds out the
  40. size of a VTxxx compatible display and sets the TERMCAP environment
  41. variable and the tty settings accordingly. Nota that this _only_ works
  42. for VTxxx compatible terminals. If you frequently use something more
  43. exotic, you should let tset recognize the terminal first and then do
  44. something like this:
  45.  
  46. if ($TERM == "vt100") eval "`resize`"
  47.  
  48. The Linux console will identify itself as a vt102, if asked. Some tset
  49. programs set the TERM variable to vt100, some set it to vt102. Check
  50. out what yours does.
  51.  
  52. > Just a quick comment, perhaps the setterm code/console driver needs to be
  53. > modified to recognize some type of absolute reset sequence.  I would
  54. > envision this sequence resetting the virtual console from which it was
  55. > invoked to the same condition it would be in after a boot sequence.  This
  56. > would be helpful in this case and also in the case when garbage gets
  57. > dumped to the screen causing selection of the alternate character set.
  58.  
  59. There already is one. Even a dumb vt100 knows how to reset itself. The
  60. control sequence is ESC c. Put this into your (linux) termcap:
  61.  
  62. rs=\Ec
  63.  
  64. Now "setterm -reset" will reset the virtual console to the power-on
  65. defaults (except for some colour settings, which are not really part
  66. of the terminal emulation). If you only want to reset the scrolling
  67. region, the sequence for that is "\E[r".
  68.  
  69. Well, I hope this helps.
  70.  
  71.     Mika
  72. --
  73. Mika Liljeberg            Email:    liljeber@hydra.Helsinki.FI
  74. Helsinki University            Mika.Liljeberg@Helsinki.FI
  75. Dept. of Computer Science
  76.