[comp.windows.x] A question regarding xterm on Sparcstations

naras@clio.stat.fsu.edu (B. Narasimhan) (06/28/91)

When I run an xterm client on my sparcstation, the TERM variable is
set to xterm and the TERMCAP variable is set to a bunch of sequences from
the /etc/termcap entry for xterm. My questions: 

Can xterm work directly with a sun terminal? Or can it only do via an
emulation of some other terminal such as the vt102?

Has anyone ever told xterm to use a sun terminal? (After all, the capabilities
of a sun terminal are known to sun machines.) 

I am asking these questions because of the map entries I set up in my .exrc
for use with vi. I have a few macros associated with function keys and I 
cannot get them to work when I use vi in an xterm window set up as above.
I know how to get around this problem---one that works is to explicitly map
the sequence each function key generates.
But my aim is to understand more about these sort of things.

Thanks.



-- 
----------------------------------------------------------------------
B. Narasimhan         Supercomputer Computations Research Institute &
naras@stat.fsu.edu    Dept. of Statistics, FSU, Tallahassee, FL 32306. 
----------------------------------------------------------------------

barmar@think.com (Barry Margolin) (06/29/91)

In article <1991Jun28.140624.4260@mailer.cc.fsu.edu> naras@clio.stat.fsu.edu (B. Narasimhan) writes:
>Can xterm work directly with a sun terminal? Or can it only do via an
>emulation of some other terminal such as the vt102?

Xterm has to emulate *some* terminal.  It currently contains emulators for
a vt100-like terminal and the tek4010.  It shouldn't be too hard to modify
it to emulate a different terminal instead of the vt100.

Xterm can't easily work "directly" with the terminal.  Its only access to
the terminal is via the X protocol.  The X protocol only passes generic
"keysyms" indicating which keys have been pressed or released.  It is up to
the client software to interpret the keys appropriately (there are library
routines and widgets that automate the common cases, such as interpreting
graphic characters and shift keys).

>Has anyone ever told xterm to use a sun terminal? (After all, the capabilities
>of a sun terminal are known to sun machines.) 

The terminal emulator Sun includes with Open Windows probably provides Sun
console emulation.

Also, xterm allows you to configure what is sent for any key by setting
"translations" resources.  Users frequently use this to implement macro
keys (e.g. a function key that sends a frequently-used command line), but
you could use it to make xterm send the same escape sequences as the Sun
console.
-- 
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar