Solved

Using apps via telnet : terminal error

Posted on 1997-08-29
3
229 Views
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.
0
Comment
Question by:deather
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
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.


0
 

Author Comment

by:deather
ID: 1586356
Thanks,

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
0
 
LVL 3

Expert Comment

by:sauron
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now