Bug 1038 - telnet gives ANSI80X30; rlogin gives (correct) cons30
Summary: telnet gives ANSI80X30; rlogin gives (correct) cons30
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1996-02-21 15:30 UTC by Mikhail T.
Modified: 1996-03-01 20:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 1996-02-21 15:30:02 UTC
	When connecting to other machines via telnet, telnet-client
	tells the whatever server, that my TERM-type is ANSI80X30 .
	In case of rlogin, it is reported correctly as cons30 .

Fix: 

Manually 
		setenv TERM cons30
	after connection is established.
How-To-Repeat: 
	See description
Comment 1 fenner 1996-02-22 00:34:00 UTC
In message <199602211527.KAA03420@aldan>you write:
>	When connecting to other machines via telnet, telnet-client
>	tells the whatever server, that my TERM-type is ANSI80X30 .

Can you do the following:

% telnet
telnet> set option
telnet> open (wherever)

It is likely that your whatever server is asking for a different name for your 
terminal type, like so:

RCVD IAC SB TERMINAL-TYPE SEND
SENT IAC SB TERMINAL-TYPE IS "CONS30"
RCVD IAC SB TERMINAL-TYPE SEND
SENT IAC SB TERMINAL-TYPE IS "ANSI80X30"
RCVD IAC SB TERMINAL-TYPE SEND
SENT IAC SB TERMINAL-TYPE IS "ANSI80X30"
RCVD IAC SB TERMINAL-TYPE SEND
SENT IAC SB TERMINAL-TYPE IS "CONS30"

It looks like the whatever server keeps asking until it gets either a terminal 
type that it recognizes or the first terminal type that I sent.  The FreeBSD 
client seems to be behaving as specified in RFC1091, perhaps it is your 
whatever server that is behaving incorrectly?

("cons30" and "ansi80x30" are synonyms in /usr/share/misc/termcap)

  Bill
Comment 2 Bill Fenner freebsd_committer freebsd_triage 1996-03-01 20:08:06 UTC
State Changed
From-To: open->closed

The option negotiation 

SENT WILL TERMINAL TYPE 
RCVD DO TERMINAL TYPE 
RCVD IAC SB TERMINAL-TYPE SEND 
SENT IAC SB TERMINAL-TYPE IS "CONS25" 
RCVD IAC SB TERMINAL-TYPE SEND 
SENT IAC SB TERMINAL-TYPE IS "ANSIS" 
RCVD IAC SB TERMINAL-TYPE SEND 
SENT IAC SB TERMINAL-TYPE IS "ANSI80X25" 
RCVD IAC SB TERMINAL-TYPE SEND 
SENT IAC SB TERMINAL-TYPE IS "ANSI80X25" 

is correct RFC-1091 behavior on the part of the telnet client. 
The telnet server is apparently either not RFC-1091 compliant or 
chooses not to pick the first-reported terminal type. 

The easiest way to work around this is to remove all aliases 
in your /usr/share/misc/termcap file; change it from 

cons25|ansis|ansi80x25: 

to 

cons25: 

and if you still want to have the ansis and ansi80x25 aliases, add entries 
like 

ansis:tc=cons25: 
ansi80x25:tc=cons25: