Next Previous Contents

9. Terminal Emulation; the Console

9.1 Terminal Emulation

Introduction

Since a PC has a screen and keyboard (as does a terminal) but also has much more computing power, it's easy to use some of this computing power to make the PC computer behave like a text terminal. Emulation software is available for MS Windows and comes built-in with recent versions of MS Windows. Most Linux software can only emulate a VT100, VT102, or VT100/ANSI. If you find out about any others, let me know. Since most PC's have color monitors but VT100 and VT102 were designed for a monochrome monitor, the emulation usually adds color capabilities (and a choice of colors). Sometimes the emulation is not 100% perfect but this usually causes few problems. For using a Mac computer to emulate a terminal see the mini-howto: Mac-Terminal.

Don't Use TERM For Emulation

Some have thought they could create an emulator at a Linux console (monitor) by setting the environment variable TERM to the type of terminal they would like to emulate. This does not work. When one does this they are in effect falsely declaring that the terminal they are now using (of type Linux) is of some other type --but it isn't. It's just like they plugged in a terminal of type A to a serial port and then set TERM to type B, thereby falsely declaring that their terminal is of type B. In this case, application programs such as editors that make use of the TERM setting will send escape codes intended for a type B terminal to a type A terminal resulting in a corrupted interface. Even with this corruption the terminal may still be usable since many different types of terminals will use identical escape sequences for many (but not all) commands.

Communication (Dialing) programs

An emulation program is often combined with a modem dialing program (such as Minicom, Seyon, or Kermit) so that one may (for example) dial up public libraries to use their catalogs and indexes, (or even read magazine articles). Seyon is only for use with X-windows and can emulate Tektronix 4014 terminals. Emulators exist under DOS such as telix and procomm work just as well. The terminal emulated is often the old VT100, VT102, or ANSI (like VT100).

Emulation under X-Windows

Xterm (obsolete ??) may be run under X-Windows which can emulate a VT102, VT220, or Tektronix 4014. There is also an xterm emulation (although there is no real terminal named "xterm"). If you don't need the Tektronix 4014 emulation (a vector graphics terminal; see Graphics Terminals) you may use eterm. Predecessors to eterm are rxvt and xvt. eterm supports pixmaps.

For non-Latin alphabets, kterm is for Kanji terminal emulation (or for other non-Latin alphabets) while xcin is for Chinese. There is also 9term emulation. This seems to be more than just an emulator as it has a built-in editor and scroll-bars. It was designed for Plan 9, a Unix-like operating system from AT&T.

Real Terminals Better

Unless you are using X-Windows with a large display, a real terminal is often nicer to use than emulating one. It usually costs less, has better resolution for text, and has no disk drives to make annoying noises. Some real terminals can emulate various other models of terminals but it's still a real terminal.

9.2 Testing Terminal Emulation

For the VT series terminals there is a test program: vttest to help determine if a terminal behaves correctly like a vt53, vt100, vt102, vt220, vt320, vt420 etc. There is no documentation but it has menus and is easy to use. To compile it run the configure script and then type "make". It may be downloaded from: ftp://ftp.clark/net:/pub/dickey/vttest/. An alternate download site is: http://sunsite.unc.edu/pub/Linux/utils/console/

9.3 The Linux Console

The console for a PC Linux system is the computer monitor It emulates a terminal of type "Linux". There is no way (unless you want to spend days rewriting the kernel code) to get it to emulate anything else. Setting the TERM environment variable to type of terminal other than "Linux" will not result in emulating that other terminal. It will only result in a corrupted interface since you have falsely declared (via the TERM variable) that your "terminal" is of a type different from what it is. See Don't Use TERM For Emulation

The "Linux" emulation is flexible and has features which go well beyond those of the vt102 terminal which it was intended to emulate. These include the ability to use custom fonts and easily re-map the keyboard (without patching the source code and recompiling the kernel as is required for the case of a real terminal). These extra features reside in the console driver software and not in the emulation software but the results are like it was part of the emulation.

Many commands exist (see Keyboard-and-Console-HOWTO) to utilize these added features. Real terminals, which use neither scan codes nor VGA cards, unfortunately can't use most of these features. One may recompile Linux to make a terminal receive the messages which normally go to the console (see Make a Terminal the Console).


Next Previous Contents