Using Telnet
Home Up Using Telnet Internet Basics File Nodes Permissions First Homework
2000-01-20 01:53


Using Telnet

This section will assist you in making telnet to a Unix system work properly.  You need to do this so that full-screen programs such as vi know the size of your telnet window.  This section should help solve problems and errors such as the following:

ex: 0602-108 unknown is not a recognized terminal type.
ex: 0602-108 ANSI is not a recognized terminal type.
ex: 0602-127 Visual mode requires more cursor capability than the terminal provides.

If you get errors similar to the above, or if vi is not redrawing the screen correctly, read on...

Basic Rules

Pay attention to these two points about using telnet to a Unix system:

Make sure your telnet window is dragged out to full size when you use it.  You will know it is full size if both the vertical and horizontal scroll bars are gone.  Drag the corner of the telnet window outward until both scroll bars are gone.
Once you start telnet and connect to Unix, do not change the size of your telnet window.  (If you change the size, Unix will not be able to track the change, and your session will not display correctly.)  Leave the window at full size, and do not change the telnet Buffer Size.

On Windows 95/98

After you start telnet and before you type in your login userid and password to the remote Unix system, make sure your telnet session is configured correctly.  Here are the things you must verify in telnet on your Windows machine:

Menu: Terminal | Preferences

Local Echo: Off
Blinking Cursor: your choice
Block Cursor: your choice
VT100 Arrows: On
Emulation: VT100/ANSI
Buffer Size: 24
Fonts: your choice of Courier-style font
Background Color: your choice

Anything marked "your choice" does not have to be changed.  You only need to set these options once and they will be remembered.

Menu: Connect | Remote System ...

If you use the telnet Connect/RemoteSystem dialog box, make sure you use the following settings:

Host Name:
Port: telnet
TermType: vt100

Note that vt100 is spelled with two lower-case letters and three digits and no blanks.  The number is one hundred.

You may type in the short name acadaix (leaving off the College domain name suffix) if you are in an Algonquin College Lab or using a College dial-in phone line.  Use the full Internet address, with the domain suffix, if you are anywhere else in the world.  (Yes, you can telnet to this Unix machine from anywhere in the world, even your from home or work.)

On Unix

On the Unix side of your connection, you have to make sure of only two things:

  1. The number of lines set in your telnet Buffer Size (in the Terminal|Preferences menu) matches the number of lines that Unix thinks you are using
  2. Your terminal type (set by the telnet program as you log in) is recognized on Unix

Setting the correct number of lines

Once you are connected to Unix and have logged in, you need to ensure that Unix knows the size of the telnet terminal window you are using.  If your Windows telnet Buffer Size (in the Terminal|Preferences menu) is set to 24, you may not need to do this (but it won't hurt).  If your Windows telnet Buffer Size is not 24, you will need to do the command below every time you connect to Unix.  (Once you learn how to create a .profile file, you can put these commands into that file for auomatic execution every time you log in.)

Use the Unix resize command on Unix to make Unix know the size of your telnet window (the window size is the Windows telnet Buffer Size in the Terminal|Preferences menu).  If just typing resize at the Unix prompt doesn't work (if you get a "not found" error from the Unix shell), you'll have to type the full Unix pathname of the resize command: /usr/bin/X11/resize


Use either of the above Unix command lines.  Note the upper-case letter X followed by the number eleven in the full pathname, and remember to use forward slashes and not backslashes.  What you should see as output after you type the command into Unix is something similar to the following:

$ /usr/bin/X11/resize

If you do not see output similar to this (the number of lines may differ, if your telnet window is not 24 lines), check your typing, then consult a lab monitor or instructor.

To use successfully full-screen commands such as vi on Unix, the number of LINES shown in the output of resize must match the Buffer Size given in the Terminal|Preferences menu of your Windows telnet session.  Make sure that the number of lines is not bigger than your screen!  24 lines is always safe; sometimes you can use 30 or even 50 if you have a big monitor (or are using small Courier fonts).  Start with a telnet Buffer Size of 24.

Setting a recognized Terminal type

When starting the vi text editor, you may see something like the following:

ex: 0602-108 unknown is not a recognized terminal type.
ex: 0602-108 ANSI is not a recognized terminal type.
ex: 0602-127 Visual mode requires more cursor capability than the terminal provides.

The above errors mean that the terminal type set by telnet for your login session is not recognized on Unix as valid.  Do not attempt to use vi or any other full-screen command if you are getting the above errors.  Full-screen commands need to know what kind of terminal you are using, to be able to draw on your screen correctly.  Fix your terminal type, first.

If you are using a Windows telnet command to connect to Unix, and you get the above errors, you can work around the problem by telling Unix that your terminal type is a vt100.  Here's how you can do this at a shell prompt:

$ TERM=vt100
$ export TERM
The case of the letters is significant, as is the use of blanks.  TERM is upper-case; vt100 is lower-case.  No blanks surround the "equals" sign; there is at least one blank between the word export and the upper-case word TERM.

If you always connect to Unix using a vt100-compatible terminal emulator (such as Windows telnet), you can put the above two lines into your .profile file for automatic execution every time you log in.

Web Author: Ian! D. Allen      Updated: 2000-01-20 01:53

Internet Free Zone Level 1 logo Support free and non-commercial Internet.

Any Browser logo This site works best in Any Browser, a campaign for non-specific WWW.

Creative Commons License logo This work is licensed under a Creative Commons License.