Introduction

Introduction

The UNIX terminal interface is a masterpiece of generalized programming. It tries to be all things to all hardware, and, for the most part, it succeeds. Consequently, however, it is a little complicated.

Because the control codes for monitors vary widely from vendor to vendor and from model to model, program output used to be hardware-specific. In effect, every time you wanted a program to run on a new piece of hardware, you had to rewrite the program. Obviously, this got cumbersome very quickly.

Linux uses intermediate programs to take the output of application programs and translate it into whatever format the display device needs. In effect, these programs are databases of hardware capabilities and control codes. These programs (termcap and terminfo) use different formats to store what is essentially the same data:

termcap

A text file containing descriptions of the functions of various terminals.

terminfo

A collection of binary files which store terminal functionality information.

Throughout this section, you'll be seeing a lot of the word tty, which stands for teletype, though almost no one uses actual teletypes anymore. A tty is the device (e.g., /dev/tty*) through which you, the typist, communicate with your machine.

The getty program starts the process of making your terminal usable. It prints out a login prompt and monitors the tty device for user input. Terminal characteristics may be displayed or modified with stty.

graphics/tip.gif

One fairly common problem is having your TERM environment variable (which should be set to whatever type of terminal you have: e.g., wy150) set wrong. If your display or scrolling is whacked, this is the first thing to check.

 

graphics/tip.gif

If you're having problems with your display and you're sure you've specified the right database entry, the entry itself may be wrong. Most terminals will emulate a vt100 at the expense of some terminal functionality.

 

The commands in this section allow you to display and modify your terminal and keyboard configuration. They include the following:

captoinfo

Convert a termcap entry to a terminfo entry.

clear

Clear the terminal screen.

dumpkeys

Display a copy of keyboard translation table.

getkeycodes

Print scancode-to-keycode translation table.

getty

Monitor a device in hopes of starting a login session.

infocmp

Compare or display terminfo entries.

loadkeys

Load keyboard translation table.

login

Initiate user login.

setterm

Set terminal configuration values.

stty

Display or set tty configuration values.

tic

Compile a terminfo entry.

tput

Access terminal information.

tset

Set terminal information.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net