blob: 7eda6fbd58701a2003a43446d30e707dcba941cf [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
2.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
3.\" *
4.\" Permission is hereby granted, free of charge, to any person obtaining a *
5.\" copy of this software and associated documentation files (the *
6.\" "Software"), to deal in the Software without restriction, including *
7.\" without limitation the rights to use, copy, modify, merge, publish, *
8.\" distribute, distribute with modifications, sublicense, and/or sell *
9.\" copies of the Software, and to permit persons to whom the Software is *
10.\" furnished to do so, subject to the following conditions: *
11.\" *
12.\" The above copyright notice and this permission notice shall be included *
13.\" in all copies or substantial portions of the Software. *
14.\" *
15.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
22.\" *
23.\" Except as contained in this notice, the name(s) of the above copyright *
24.\" holders shall not be used in advertising or otherwise to promote the *
25.\" sale, use or other dealings in this Software without prior written *
26.\" authorization. *
27.\"***************************************************************************
28.\"
29.\" $Id: term.7,v 1.18 2007/06/02 20:40:07 tom Exp $
30.TH term 7
31.ds n 5
32.ds d @TERMINFO@
33.SH NAME
34term \- conventions for naming terminal types
35.SH DESCRIPTION
36.PP
37The environment variable \fBTERM\fR should normally contain the type name of
38the terminal, console or display-device type you are using. This information
39is critical for all screen-oriented programs, including your editor and mailer.
40.PP
41A default \fBTERM\fR value will be set on a per-line basis by either
42\fB/etc/inittab\fR (Linux and System-V-like UNIXes) or \fB/etc/ttys\fR (BSD
43UNIXes). This will nearly always suffice for workstation and microcomputer
44consoles.
45.PP
46If you use a dialup line, the type of device attached to it may vary. Older
47UNIX systems pre-set a very dumb terminal type like `dumb' or `dialup' on
48dialup lines. Newer ones may pre-set `vt100', reflecting the prevalence of DEC
49VT100-compatible terminals and personal-computer emulators.
50.PP
51Modern telnets pass your \fBTERM\fR environment variable from the local side to
52the remote one. There can be problems if the remote terminfo or termcap entry
53for your type is not compatible with yours, but this situation is rare and
54can almost always be avoided by explicitly exporting `vt100' (assuming you
55are in fact using a VT100-superset console, terminal, or terminal emulator.)
56.PP
57In any case, you are free to override the system \fBTERM\fR setting to your
58taste in your shell profile. The \fBtset\fP(1) utility may be of assistance;
59you can give it a set of rules for deducing or requesting a terminal type based
60on the tty device and baud rate.
61.PP
62Setting your own \fBTERM\fR value may also be useful if you have created a
63custom entry incorporating options (such as visual bell or reverse-video)
64which you wish to override the system default type for your line.
65.PP
66Terminal type descriptions are stored as files of capability data underneath
67\*d. To browse a list of all terminal names recognized by the system, do
68.sp
69 @TOE@ | more
70.sp
71from your shell. These capability files are in a binary format optimized for
72retrieval speed (unlike the old text-based \fBtermcap\fR format they replace);
73to examine an entry, you must use the \fB@INFOCMP@\fR(1M) command.
74Invoke it as follows:
75.sp
76 @INFOCMP@ \fIentry-name\fR
77.sp
78where \fIentry-name\fR is the name of the type you wish to examine (and the
79name of its capability file the subdirectory of \*d named for its first
80letter). This command dumps a capability file in the text format described by
81\fBterminfo\fR(\*n).
82.PP
83The first line of a \fBterminfo\fR(\*n) description gives the names by which
84terminfo knows a terminal, separated by `|' (pipe-bar) characters with the last
85name field terminated by a comma. The first name field is the type's
86\fIprimary name\fR, and is the one to use when setting \fBTERM\fR. The last
87name field (if distinct from the first) is actually a description of the
88terminal type (it may contain blanks; the others must be single words). Name
89fields between the first and last (if present) are aliases for the terminal,
90usually historical names retained for compatibility.
91.PP
92There are some conventions for how to choose terminal primary names that help
93keep them informative and unique. Here is a step-by-step guide to naming
94terminals that also explains how to parse them:
95.PP
96First, choose a root name. The root will consist of a lower-case letter
97followed by up to seven lower-case letters or digits. You need to avoid using
98punctuation characters in root names, because they are used and interpreted as
99filenames and shell meta-characters (such as !, $, *, ?, etc.) embedded in them
100may cause odd and unhelpful behavior. The slash (/), or any other character
101that may be interpreted by anyone's file system (\e, $, [, ]), is especially
102dangerous (terminfo is platform-independent, and choosing names with special
103characters could someday make life difficult for users of a future port). The
104dot (.) character is relatively safe as long as there is at most one per root
105name; some historical terminfo names use it.
106.PP
107The root name for a terminal or workstation console type should almost always
108begin with a vendor prefix (such as \fBhp\fR for Hewlett-Packard, \fBwy\fR for
109Wyse, or \fBatt\fR for AT&T terminals), or a common name of the terminal line
110(\fBvt\fR for the VT series of terminals from DEC, or \fBsun\fR for Sun
111Microsystems workstation consoles, or \fBregent\fR for the ADDS Regent series.
112You can list the terminfo tree to see what prefixes are already in common use.
113The root name prefix should be followed when appropriate by a model number;
114thus \fBvt100\fR, \fBhp2621\fR, \fBwy50\fR.
115.PP
116The root name for a PC-Unix console type should be the OS name,
117i.e. \fBlinux\fR, \fBbsdos\fR, \fBfreebsd\fR, \fBnetbsd\fR. It should
118\fInot\fR be \fBconsole\fR or any other generic that might cause confusion in a
119multi-platform environment! If a model number follows, it should indicate
120either the OS release level or the console driver release level.
121.PP
122The root name for a terminal emulator (assuming it does not fit one of the
123standard ANSI or vt100 types) should be the program name or a readily
124recognizable abbreviation of it (i.e. \fBversaterm\fR, \fBctrm\fR).
125.PP
126Following the root name, you may add any reasonable number of hyphen-separated
127feature suffixes.
128.TP 5
1292p
130Has two pages of memory. Likewise 4p, 8p, etc.
131.TP 5
132mc
133Magic-cookie. Some terminals (notably older Wyses) can only support one
134attribute without magic-cookie lossage. Their base entry is usually paired
135with another that has this suffix and uses magic cookies to support multiple
136attributes.
137.TP 5
138-am
139Enable auto-margin (right-margin wraparound).
140.TP 5
141-m
142Mono mode - suppress color support.
143.TP 5
144-na
145No arrow keys - termcap ignores arrow keys which are actually there on the
146terminal, so the user can use the arrow keys locally.
147.TP 5
148-nam
149No auto-margin - suppress am capability.
150.TP 5
151-nl
152No labels - suppress soft labels.
153.TP 5
154-nsl
155No status line - suppress status line.
156.TP 5
157-pp
158Has a printer port which is used.
159.TP 5
160-rv
161Terminal in reverse video mode (black on white).
162.TP 5
163-s
164Enable status line.
165.TP 5
166-vb
167Use visible bell (flash) rather than beep.
168.TP 5
169-w
170Wide; terminal is in 132 column mode.
171.PP
172Conventionally, if your terminal type is a variant intended to specify a
173line height, that suffix should go first. So, for a hypothetical FuBarCo
174model 2317 terminal in 30-line mode with reverse video, best form would be
175\fBfubar-30-rv\fR (rather than, say, `fubar-rv-30').
176.PP
177Terminal types that are written not as standalone entries, but rather as
178components to be plugged into other entries via \fBuse\fP capabilities,
179are distinguished by using embedded plus signs rather than dashes.
180.PP
181Commands which use a terminal type to control display often accept a -T
182option that accepts a terminal name argument. Such programs should fall back
183on the \fBTERM\fR environment variable when no -T option is specified.
184.SH PORTABILITY
185For maximum compatibility with older System V UNIXes, names and aliases
186should be unique within the first 14 characters.
187.SH FILES
188.TP 5
189\*d/?/*
190compiled terminal capability data base
191.TP 5
192/etc/inittab
193tty line initialization (AT&T-like UNIXes)
194.TP 5
195/etc/ttys
196tty line initialization (BSD-like UNIXes)
197.SH SEE ALSO
198\fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBterm\fR(\*n).
199.\"#
200.\"# The following sets edit modes for GNU EMACS
201.\"# Local Variables:
202.\"# mode:nroff
203.\"# fill-column:79
204.\"# End: