X-Envelope-to: NOVELL@SUVM.BITNET
X-VMS-To: IN%"NOVELL@SUVM.BITNET"
X-VMS-Cc: JRD
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
Newsgroups: bit.listserv.novell
Date:         Sat, 9 Jan 1993 12:02:46 -0600
Reply-To:     Novell LAN Interest Group <NOVELL@SUVM.BITNET>
From:         Joe Doupnik <JRD@USU.BITNET>
Subject:      Re: LWP/Kermit to do Tek Emulation... HELP PLEASE

>    I while ago I posted a message about a need to get Tektronix emulation on
>    a computer running Lan Workplace for DOS.  Brian Meek responded that the
>    easiest way was to run Kermit... and IT WORKS (thanks, Brian).
>    However, I have one small VERY PUZZLING problem.. and that it the Unix
>    host I am connecting to insists that it's remote session (my machine) is
>    a VT220, and my Unix administrator insists that somewhere, that is what I
>    am telling it.
>    I have (painfully) gone through as much of the LWP and Kermit
>    configuration files without finding anywhere where I am telling the Unix
>    box that I am a VT220.  I have even placed in the mscustom.ini file
>    (used by Kermit) two lines...
>
>    set term vt100
>    and
>    TCP/IP TELNET-TERM-TYPE VT100
>
>    The bottom line on the screen, once the connection is made says I am a
>    vt100.
>
>    Can anyone please help me with this (Brian, Joe D.???)..
>    Thanks-
>--------------------------------------------
>Leslie Pearlman, Computing Resources Manager
>School of Biological Sciences
>University of California Irvine
>email: lpearlma@uci.edu
>phone: (714) 856-4247
--------------------------------------------
        Let's take the easy part first. The Kermit command SET TCP TELNET type
(did you include the SET?) does just one thing: it puts that string (type)
into the Telnet response packet if, and only if, the host asks for it. Kermit
makes the offer of providing it. Some hosts ask and use the response, some
ask and have inadequate terminal tables so the response may not make sense
(or you gave a string beyond its tables), some hosts never ask.
        If you recall recently someone complained that LWP/DOS responded that
it was a dec-vt220 (or similar) and the host said What's that? Brian Meek said
"dec-vt220" is the official Telnet string, in the RFCs. True enough, but many
hosts are RFC ignorant and prefer "vt220" or "VT220" or something else
entirely. That's why Kermit has the manual override command above. Kermit does
automatically provide "vt320" or "vt220" etc if you don't override; these are
not RFC compliant names, but they are acceptable to my SVR4 Unix machine.
Acceptable means the strings are terminal types in my terminfo database, and
you can add your own types there easily enough. Curiously, "vt320" is often
missing or is badly garbled (I gave AT&T the proper terminfo material a
couple years ago so it should be in recent USL releases). The Telnet terminal
type RFC list is far removed from common practice these days.
        Now to the hard part: the Unix host. Some machines have wierd and
wonderful ways of ferreting out terminal type information during the login
process. Typically they send a short control sequence command and examine
responses, and then try another if the first did not make sense or yielded
no response. The stimulus and expected responses are done by a program in
the host, usually aided by a text script. This technique is independent of
communications channel, though the login scripts need to include it. My
Unix machine also has this mechanism. The terminal emulator must recognize
the stimulus and then reply. Kermit does so. Below is a section of Kermit
documentation file MSVIBM.VT (also in the Users Manual book "Using MS-DOS
Kermit"):

 VT320 Report requests and responses

 Request CSI c                  primary device attributes (terminal ident)
 Responses
        CSI ? 63; 1; 2; 4; 6; 8; 9; 15 c VT320 (132 col,printer,selective chars
        CSI ? 6 c                       VT102     UDK,NRC,Sixel,DEC Tech char)
        CSI ? 1 c                       VT100
        ESC / Z                         VT52, submode of VT320/VT102
        ESC / K                         VT52, when in Heath-19 mode
                Pn      meaning
                1       132 columns
                2       Printer port
                3       ReGIS graphics
                4       Sixel graphics
                6       Selective erase
                7       Soft character set (DRCS)
                8       User-defined keys
                9       National replacement character sets
                13      Local editing mode
                15      Technical character set
                16      Locator device port
                18      Windowing capability
                19      Dual sessions
                61      Operating level 1 (VT100)
                62      Operating level 2 (VT200)
                63      Operating level 3 (VT300 or VT200)

 Request  CSI > c               secondary device attributes
 Response CSI > 24; 0; 0; 0 c           VT320, firmware version 0.0 (Kermit)


In the above, CSI is an 8 bit control code; the 7 bit equivalent is ESC [.
Note the Kermit-specific values in the secondary device attributes report.
As you can surmize, VT300 (or 200) is a class, and individual units have
optional features available depending on the money spent on it. VMS VAXen
decode the class (SET TERM/DEVICE=VT300) from the 63 and then turn on/off
attributes from the following list of numbers; Unix machines are not so
intelligent.
        Lastly, it is very possible that your host has a terminal type
hardwired into the o/s by the system manager or by something you have in
your .profile login script.
        In the end you can override all of these things by setting the
Unix environment to hold the terminal type you want right now. In Kshell and
Bourne shell-speak:
        TERM=terminal-type-string
        export TERM
Csh users are on their own (setenv); I can't abide that shambles.
So go look at your environment and see what's there.
        Good luck,
        Joe D.
Newsgroups: bit.listserv.novell