DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Adding serial terminals

Setting the terminal type at login

UNIX systems require that the terminal type be clearly defined before any work is done at the terminal. The preferable method for setting your terminal type is to assign the type to the TERM variable, a special environment variable that associates the terminal you are using with a list of characteristics given in the terminfo(M) database. The characteristics tell the system how to interpret your terminal's keys and how to display data on your terminal screen.

If you are using the Bourne or Korn shell (sh(C) or ksh(C)), the TERM assignment has the form:

TERM=termtype; export TERM

If you are using the C shell (csh(C)), the TERM assignment has the form:

setenv TERM termtype

The termtype must be one of the names associated with one of the terminals defined in the /usr/lib/terminfo/terminfo.src file. The assignment must be entered at the terminal whose type you are setting.

For example, to set the terminal type to ``ansi'' from the Bourne shell, go to the terminal you wish to set, enter at the $ shell prompt:

TERM=ansi; export TERM

From the C shell, enter at the % shell prompt:

setenv TERM ansi

If you are not sure which name you may use for termtype, you can view the names either by reading the terminals(M) manual page which lists all terminals supported in the terminfo database, or by displaying the /usr/lib/terminfo/terminfo.src file:

more /usr/lib/terminfo/terminfo.src

You can let the system define the terminal type automatically whenever you log in by including the TERM assignment in your .profile file.

For an alternate method of setting your terminal type, see the manual page for tset(C).

If you let the system set the terminal type, be careful when logging in on terminals that are not the same as your normal terminal. The system has no way of checking whether or not the terminal assignment is correct for the given terminal and assumes that it is the same as your normal terminal. If it is not, you must set the terminal type manually.


Next topic: Setting the terminal type automatically
Previous topic: Changing serial line operation

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005