terminfo-entry and $TERM

Mark Sobkow msobkow at worldnet.att.net
Sun Mar 11 22:57:34 PST 2001

This issue seems to come up a lot on the list.  It's probably some where in 
the hints, but in case it's not, you can try adding something like the 
following to your .profile, .kshrc, or .bashrc (as appropriate.)  As I have 
all xterms starting a pdksh with login semantics, I put it in my profile 
(that way the code doesn't re-execute whenever a shell starts, which can 
get intrusive and hurt performance.)

You may have to futz with it, depending on the options your version of tset 
recognizes.  It's also not entirely platform portable, and doesn't work 
with some telnets that don't properly identify the term type (like the 
default one included with WinXX.)

BTW, the "$DT" check is a holdover from CDE platforms.  It's not empty 
during a console login when X is initializing, so you don't want the 
terminal interrogation going on at that time, only when you're starting 
your terminal windows after successfully logging in and starting the window 
manager.  If you're not working with CDE environments, just cut out the 
if/fi pair.

The ^? and such are the appropriate printable characters, not untranslated 

     if [ "$DT" = "" ]; then
         unset TERM
         eval `tset -m unknown:xterm -m telnet:vt100 -m xterm:xterm -m 
dialup:vt100 -m dtterm:dtterm -Q -s`
         export TERM

         if [ "$TERM" = "vt100" ]; then
             case `tty` in
                     stty erase ^?
                     stty erase ^?
                     stty erase ^H
         elif [ "$TERM" = "xterm" ]; then
             stty erase ^?
Version: 3.1
GIT/B d+(++$) s+:++ a C+++$ ULS++$> P+$ L++ E- W++$> N+
o? K? w--(++$$$) O M- V-- PS+  PE+ Y+ PGP> t+ 5++ X> R> tv+ b++>
DI++ D++ G e++ h+ r-- y?

Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list