[Techtalk] prevent screen from clearing

Akkana Peck akkana at shallowsky.com
Thu Sep 29 03:16:39 EST 2005


Kai MacTane writes:
> At 07:05 PM 9/26/2005 , Akkana Peck wrote:
> 
> >That drives me crazy too! I'm glad I'm not the only one.
> 
> And me three (or five, or how many people have agreed by now). And thank 
> you for writing up instructions on stopping it.
> 
> My only problem, it doesn't seem to work for me. I usually SSH into my 
> Linux box from elsewhere. According to "set | grep -i term", my 
> $TERM=xterm. My .Xdefaults file already had the line
> 
> XTerm.VT100.titeInhibit:  true

One thing I should clarify: "xterm" can mean two different things.

There's a terminal emulation program called xterm which was part of
the early X releases, and has been part of X ever since. Several
other programs have been built on top of the xterm code base:
rxvt, for example, removes a bunch of code they figured no one
was using (like Tektronix graphics terminal emulation) and adds
some features like better character classes and a nicer scrollbar
widget, but the basic terminal emulation still uses the old xterm
code. 

These are programs that you usually run on your local machine
(you don't have to -- you can remote-display to your X server from
some other machine -- but most people will run them locally).
There are lots of other terminal programs, such as gnome-terminal,
konsole, eterm etc, which are not based on xterm and use no xterm code.

There's also a terminal type called xterm, represented by terminfo
and/or termcap (does anything still use termcap?) entries. The
terminal type is a description of which escape sequences do what:
like ctrl-L clears the screen, ESC-[-H puts the cursor "home" (at
the top left), ESC-[-1-m makes text bold, and so forth. The original
xterm program emulated the DEC vt100 terminal, more or less, but
over the years they added some functionality that vt100s didn't have
(and perhaps removed other functionality), and somewhere along the
line someone wrote a special terminfo entry for xterm which was
slightly different from vt100.

The terminal type is what you see when you look at $term or $TERM in
your shell or your environment variables. If you're remotely logged
in to another machine, this is set on the remote system, wherever
your shell is (and programs such as vi and man are).

So when you checked "set | grep -i term", you verified that you're
using the xterm terminal type, but you might still be using
gnome-terminal or some other program that doesn't honor titeInhibit.
In that case, you have to trick it by using a terminal type that
doesn't include the rmcup misfeature, such as my terminfo entry.
(Or switch to a terminal program which does let you configure this.)

	...Akkana


More information about the Techtalk mailing list