NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42836: window(1) display error on most TERMs



The following reply was made to PR bin/42836; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/42836: window(1) display error on most TERMs
Date: Wed, 17 Feb 2010 22:54:10 +0700

     Date:        Wed, 17 Feb 2010 13:50:01 +0000 (UTC)
     From:        cberardi%natoufa.com@localhost
     Message-ID:  <20100217135001.3BF8063B8DE%www.NetBSD.org@localhost>
 
   | When using window(1), the only TERM that displays properly is window-v2
   | Every other TERM I've tried (vt100, vt220, wsvt25, xterm, linux)
   | all have display errors.
 
 I think you are misunderstanding the relationship between a terminal
 emulator, the TERM environment variable.
 
 A terminal emulator (generally) emulates a particular terminal, either
 a real one (from the past now - if anyone still makes them, I haven't seen
 one in ages) or a fictional one of the emulator's own design.
 
 The TERM environment variable is used to tell other applications what terminal
 type is being emulated - so that they can generate the proper sequences
 to control the terminal (via the termcap, termlib, or curses libraries,
 usually).
 
 You don't get to choose the terminal emulation you want by altering TERM,
 even terminal emulators that can emulate more than one terminal type
 (like xterm for example) have to be told some other way which terminal
 type they're to emulate - that's because even if they wanted to, they don't
 get to see changes you make to TERM in a shell running inside the emulator,
 only that shell, and processes it starts (after the change) see it.  All the
 emulator sees is different (and probably meaningless) command sequences being
 sent at it - it is hardly surprising that what appears on the screen
 is "gobbledygook".
 
 The only changes to TERM that you can make that have any chance of working,
 are to switch to a terminal type that is a different subset of the terminal
 emulated by the terminal emulator (so, if you have an emulator that
 emulates a vt220, you should be able to set TERM to vt100, and it would
 work (or should mostly work) as a vt100 is (mostly) a subset of a vt220).
 
 If you need something the terminal emulator cannot handle, then you need
 a different terminal emulator.
 
 With window, I believe, most of the terminal it emulates is controlled by
 the terminal type it is running in (the underlying emulator), so if you
 want some specific terminal type with window, what should work is to
 get an emulator (xterm, mlterm, aterm, ...) that can handle what you need,
 with TERM set correctly for that emulator, and then start window - the
 terminal it emulates (and the TERM and TERMCAP variables it exports to
 the shells it starts) should mostly do what you want, I think.   Whether that
 extends to 8 bit (or utf-8, or other) character encodings I have no idea.
 
 kre
 


Home | Main Index | Thread Index | Old Index