Subject: xsrc/10383: xterm always clears the screen when termcap-using programs exit
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 06/16/2000 15:27:12
>Synopsis: xterm always clears the screen when termcap-using programs exit
>Arrival-Date: Fri Jun 16 15:28:00 PDT 2000
>Originator: Michael Eriksson
>Release: -current of about May 30, 2000; xsrc of June 13, 2000
Ericsson Radio Systems AB
System: NetBSD kafka 1.4Z NetBSD 1.4Z (KAFKA) #0: Wed May 31 23:43:12 CEST 2000 mer@kafka:/usr/src/sys/arch/i386/compile/KAFKA i386
When using titeInhibit, xterm removes the ``ti'' and ``te''
capabilities from the termcap entry it exports in $TERMCAP. As the
xterm termcap entry is too long to fit in 1024 bytes, a ZZ capability
is used by NetBSD's new termcap code, and thus the $TERMCAP is ignored
at program startup. That is, all programs use the ``ti'' and ``te''
capabilities even if titeInhibit is set in xterm. As the ``te''
capability contains a clear screen sequence (and a restore cursor
sequence), the screen gets cleaned at each exit of termcap-using
programs such as emacs and top.
Try to run top in an xterm with titeInhibit set, and watch it clear
the screen when top is exited.
Setting a $TERMCAP that doesn't match the real termcap entry is
obviously a hack, but titeInhibit is nice, so it would be a pity to
just remove it.
1. Remove the clear screen ("\E[2J") and cursor restore ("\E8")
sequences from the ``te'' capability.
2. Let $TERMCAP point to a file which contains a termcap entry without
the ``ti'' and ``te'' capabilities.
3. Set $TERM to something else than "xterm", like "xterm-ti". This
isn't very nice when doing network logins to systems where this
terminal type isn't defined, though.
4. Make the xterm termcap entry fit in 1024 bytes :-)