home *** CD-ROM | disk | FTP | other *** search
- 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
- From: liljeber@hydra.Helsinki.FI (Mika Liljeberg)
- Newsgroups: comp.os.linux
- Subject: Re: linux-0.98.3 termcap problem
- Message-ID: <LILJEBER.92Nov5222226@hydra.Helsinki.FI>
- Date: 5 Nov 92 20:22:26 GMT
- References: <1992Nov1.004828.6310@afterlife.ncsc.mil><1992Nov1.101439.10943@klaava.Helsink
- i.FI>
- <1992Nov1.144417.25896@wam.umd.edu><1992Nov1.172235.21007@klaava.Helsinki.FI>
- <92308.071727NU013809@NDSUVM1.BITNET>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: Department of Computer Science, University of Helsinki, Finland
- Lines: 62
- In-Reply-To: NU013809@NDSUVM1.BITNET's message of 3 Nov 92 13: 17:27 GMT
-
- In article <92308.071727NU013809@NDSUVM1.BITNET> NU013809@NDSUVM1.BITNET (Greg Wettstein) wrote:
- > Speaking of TERMCAP problems I am wondering if anyone has noticed this yet.
- >
- > According to the discussions here and on the mailing list I decided to
- > always refer to our Linux machines as VT220's when I logged onto other
- > systems which use TERMCAP style entries. console is great for Linux but of
- > course unknown to other systems.
- >
- > After logging into a couple of systems I suddenly noticed that the virtual
- > console was restricting itself to 24 lines. For example if less is used
- > to view a file and the sh prompt is on the bottom line of the screen the
- > entire output gets displayed on the bottom line of the screen. Using
- > less with the prompt at the top of the screen causes less to use the
- > console as if it had 24 lines.
-
- Yes, this is because the remote host _knows_ a VT220 has only 24
- lines. The reset (rs) or initialization (is) string in the remote
- host's termcap probably does something like this: "\E[1;24r". This
- sets up the vtxxx scrolling region. 24 lines. Ugh.
-
- I usually handle this problem by putting the following line into my
- .login (on the remot host, of course):
-
- eval "`resize`"
-
- Resize comes with X11. It resets the scrolling region, finds out the
- size of a VTxxx compatible display and sets the TERMCAP environment
- variable and the tty settings accordingly. Nota that this _only_ works
- for VTxxx compatible terminals. If you frequently use something more
- exotic, you should let tset recognize the terminal first and then do
- something like this:
-
- if ($TERM == "vt100") eval "`resize`"
-
- The Linux console will identify itself as a vt102, if asked. Some tset
- programs set the TERM variable to vt100, some set it to vt102. Check
- out what yours does.
-
- > Just a quick comment, perhaps the setterm code/console driver needs to be
- > modified to recognize some type of absolute reset sequence. I would
- > envision this sequence resetting the virtual console from which it was
- > invoked to the same condition it would be in after a boot sequence. This
- > would be helpful in this case and also in the case when garbage gets
- > dumped to the screen causing selection of the alternate character set.
-
- There already is one. Even a dumb vt100 knows how to reset itself. The
- control sequence is ESC c. Put this into your (linux) termcap:
-
- rs=\Ec
-
- Now "setterm -reset" will reset the virtual console to the power-on
- defaults (except for some colour settings, which are not really part
- of the terminal emulation). If you only want to reset the scrolling
- region, the sequence for that is "\E[r".
-
- Well, I hope this helps.
-
- Mika
- --
- Mika Liljeberg Email: liljeber@hydra.Helsinki.FI
- Helsinki University Mika.Liljeberg@Helsinki.FI
- Dept. of Computer Science
-