Using apps via telnet : terminal error

Posted on 1997-08-29
Last Modified: 2010-03-18
I am connecting to my linux machine via telnet
from an OS/2 v4.0 workstation.  I connect fine
but when I try to use an application (eg. pine) it
gives me an "unknown terminal vt220" error.  I have
tried typing "set term vt100" but it does not seem to
help.    I connect to other unix machines (solaris, bsd)
from the same OS/2 machine and it works great!  Any
ideas would be appreciated.
Question by:deather
  • 2

Accepted Solution

sauron earned 100 total points
ID: 1586355
Your telnet client is obviously advertising itself as a vt220
terminal, and for some reason your Linux system doesn't appear to have an entry in /etc/termcap for a vt220. This is odd, as these are common terminals, and I thought most distributions had them. You may want to look into this - get an updated termcap package for whatever distribution you are using.

Anyway, to solve your immediate problem, if you are using bash, try:-

export TERM=vt100

or for csh (tcsh):-

setenv TERM vt100

The variable names are case sensitive.


Author Comment

ID: 1586356

I looked at termcap...seems to be just a text file.  Can I
just download a termcap file and overwrite it?

Secondly, what does  export TERM=vt100 do?  Do I have to do this
locally first under root, then logon remotely and it will be fine?  Or just do this remotely when I log in via a telnet session?    Is it permanent or must it be done each time?

Thanks again

Expert Comment

ID: 1586357
Termcap is indeed just a text file. Yes, you should just be able to download a more complete termcap, and overwrite it, but make sure you back up first. You'll find loads of things stop working without a proper termcap file. Some apps also use the terminfo database.

>Secondly, what does export TERM=vt100 do?

Well, when you telnet into your remote machine, most telnet clients will communicate a terminal type to the remote host. This info ends up in an environment variable called TERM. If you telnet into your system, and then type 'echo $TERM', the shell will give you the value of the variable, probably vt220 in your case.

Bash allows you to set an environment variable by using syntax like VAR=name, so doing TERM=vt100 sets your terminal type to vt100, which is pretty much a 'lowest common denominator' terminal type. If you have anything in your termcap, you should have this.... Using the export command simply makes sure that processes spawned by the shell (e.g. Pine) inherit the new variable setting.

When you start Pine, it uses the TERM variable to reference /etc/termcap, and from the termcap information, it can figure out how to control the screen it is running on.

You will have to re-export the variable every time you want to use Pine (or vi, or loads of other things). You just do this after you log in via telnet each time. Better solutions are:-

1/ Change your /etc/termcap to include an entry for a vt220
2/ Change the setup of your telnet client to send a different
teminal type, that you have a termcap entry for.
3/ Add the export TERM line to your ~/.bash_profile so it gets set every time you log in.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux / python expert needed 3 98
php54-php-imap for redhat enterprise linux 7.2 1 93
centos7 firewalld udp ports 33 78
Setting up two Raspberry Pi gateways/routers 3 82
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question