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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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