[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Using apps via telnet : terminal error

Posted on 1997-08-29
Medium Priority
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 200 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

872 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