Changing terminal emulators

terminalterminal-emulatorxterm

I have ssh access to a remote machine. In this machine if I run echo $TERM I get xterm.

If I want to change my terminal emulator to some other emulator (assuming that it's installed on the remote machine), how would I do it?

Best Answer

The value of the environment variable TERM is used by the server (in system V, or BSD, derived OSes) to control how input is recognized by the system, and what capabilities exist for output. Some terminal types are similar enough that they can be interchanged while still remaining usefull, while others could make the system unusable until you open a new connection with a supported value for TERM. For example, from one Linux system to another, you would probably experience very little difference between vt100, vt220, and xterm settings. Most of the differences would be in how output is displayed, and whether colors or bold fonts are available to that type of terminal. The termcap database lists all the terminal types, with their various capabilities.

As long as you don't switch to a terminal type that your keyboard and screen aren't compatible with, you'll be fine.

read the man page for term, and termcap, on your system for more information.

To change the terminal type:

in bash:

export TERM=vt100

in bourne shell or ksh:

TERM=vt100
export TERM

in csh or tcsh:

setenv TERM vt100

vt100 is a pretty safe terminal to start playing with. it's compatible with xterm, but it doesn't display colors or bold fonts, and may not recognize your F* keys, but you're unlikely to really mess anything up using vt100.

A lot of people use terminal detection in personal init scripts to optimize their user experience depending how how they're logging into the server. For example, set a plain PS1 if you're using vt100, use color and dynamic variables when using bash in an xterm.

Good luck with your research.

Related Question