[Next] [Previous] [Up] [Top] [Contents]

17.7 Terminal Control

17.7.1 The terminfo database

The terminfo database contains the descriptions of the terminal capabilities. It's used by programs such as vi and the curses package to control the screen.

The database is kept in the /usr/share/lib/terminfo directory with subdirectories specified by the first character of the names of the terminfo files. Each terminfo description is a separate, compiled file, within the subdirectory matching the first character of its name [1-9,a-z,A-Z].

The terminfo files are functionally equivalent to the individual entries in the termcap file, however, the terminfo files are in a compiled format, not ASCII, as is the termcap file. The entries in a terminfo file are described in the terminfo(4) man page.

You can display the contents of a terminfo file in a format similar to a termcap entry using the infocmp command. With no options and no TERMINFO environment variable set infocmp assumes the desired terminfo file is that of the TERM variable, e.g.:

# infocmp
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/x/xterm
xterm|vs100|xterm terminal emulator,
am, km, mir, msgr, xenl,
cols#80, it#8, lines#65,
bel=^G, blink=@, bold=\E[1m, clear=\E[H\E[2J, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
sgr0=\E[m, smacs=^N, smkx=\E[?1h\E=, smso=\E[7m,

Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]