Penguin
Annotated edit history of term(7) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 TERM
2 !!!TERM
3 NAME
4 DESCRIPTION
5 PORTABILITY
6 FILES
7 SEE ALSO
8 ----
9 !!NAME
10
11
12 term - conventions for naming terminal types
13 !!DESCRIPTION
14
15
16 The environment variable __TERM__ should normally contain
17 the type name of the terminal, console or display-device
18 type you are using. This information is critical for all
19 screen-oriented programs, including your editor and
20 mailer.
21
22
23 A default __TERM__ value will be set on a per-line basis
24 by either __/etc/inittab__ (Linux and System-V-like
25 UNIXes) or __/etc/ttys__ (BSD UNIXes). This will nearly
26 always suffice for workstation and microcomputer
27 consoles.
28
29
30 If you use a dialup line, the type of device attached to it
31 may vary. Older UNIX systems pre-set a very dumb terminal
32 type like `dumb' or `dialup' on dialup lines. Newer ones may
33 pre-set `vt100', reflecting the prevalence of DEC
34 VT100-compatible terminals and personal-computer
35 emulators.
36
37
38 Modern telnets pass your __TERM__ environment variable
39 from the local side to the remote one. There can be problems
40 if the remote terminfo or termcap entry for your type is not
41 compatible with yours, but this situation is rare and can
42 almost always be avoided by explicitly exporting `vt100'
43 (assuming you are in fact using a VT100-superset console,
44 terminal, or terminal emulator.)
45
46
47 In any case, you are free to override the system __TERM__
48 setting to your taste in your shell profile. The
49 tset(1) utility may be of assistance; you can give it
50 a set of rules for deducing or requesting a terminal type
51 based on the tty device and baud rate.
52
53
54 Setting your own __TERM__ value may also be useful if you
55 have created a custom entry incorporating options (such as
56 visual bell or reverse-video) which you wish to override the
57 system default type for your line.
58
59
60 Terminal type descriptions are stored as files of capability
61 data underneath /usr/share/terminfo. To browse a list of all
62 terminal names recognized by the system, do
63
64
65 toe | more
66
67
68 from your shell. These capability files are in a binary
69 format optimized for retrieval speed (unlike the old
70 text-based __termcap__ format they replace); to examine
71 an entry, you must use the infocmp(1) command. Invoke
72 it as follows:
73
74
75 infocmp ''entry-name''
76
77
78 where ''entry-name'' is the name of the type you wish to
79 examine (and the name of its capability file the
80 subdirectory of /usr/share/terminfo named for its first
81 letter). This command dumps a capability file in the text
82 format described by terminfo(5).
83
84
85 The first line of a terminfo(5) description gives the
86 names by which terminfo knows a terminal, separated by `|'
87 (pipe-bar) characters with the last name field terminated by
88 a comma. The first name field is the type's ''primary
89 name'', and is the one to use when setting __TERM__.
90 The last name field (if distinct from the first) is actually
91 a description of the terminal type (it may contain blanks;
92 the others must be single words). Name fields between the
93 first and last (if present) are aliases for the terminal,
94 usually historical names retained for
95 compatibility.
96
97
98 There are some conventions for how to choose terminal
99 primary names that help keep them informative and unique.
100 Here is a step-by-step guide to naming terminals that also
101 explains how to parse them:
102
103
104 First, choose a root name. The root will consist of a
105 lower-case letter followed by up to seven lower-case letters
106 or digits. You need to avoid using punctuation characters in
107 root names, because they are used and interpreted as
108 filenames and shell meta-characters (such as !, $, *, ?
109 etc.) embedded in them may cause odd and unhelpful behavior.
110 The slash (/), or any other character that may be
111 interpreted by anyone's file system (, $, [[, ]), is
112 especially dangerous (terminfo is platform-independent, and
113 choosing names with special characters could someday make
114 life difficult for users of a future port). The dot (.)
115 character is relatively safe as long as there is at most one
116 per root name; some historical terminfo names use
117 it.
118
119
120 The root name for a terminal or workstation console type
121 should almost always begin with a vendor prefix (such as
122 __hp__ for Hewlett-Packard, __wy__ for Wyse, or
123 __att__ for AT
124 __vt__ for the VT series of terminals from
125 DEC, or __sun__ for Sun Microsystems workstation
126 consoles, or __regent__ for the ADDS Regent series. You
127 can list the terminfo tree to see what prefixes are already
128 in common use. The root name prefix should be followed when
129 appropriate by a model number; thus __vt100__,
130 __hp2621__, __wy50__.
131
132
133 The root name for a PC-Unix console type should be the OS
134 name, i.e. __linux__, __bsdos__, __freebsd__,
135 __netbsd__. It should ''not'' be __console__ or any
136 other generic that might cause confusion in a multi-platform
137 environment! If a model number follows, it should indicate
138 either the OS release level or the console driver release
139 level.
140
141
142 The root name for a terminal emulator (assuming it doesn't
143 fit one of the standard ANSI or vt100 types) should be the
144 program name or a readily recognizable abbreviation of it
145 (i.e. __versaterm__, __ctrm__).
146
147
148 Following the root name, you may add any reasonable number
149 of hyphen-separated feature suffixes.
150
151
152 2p
153
154
155 Has two pages of memory. Likewise 4p, 8p, etc.
156
157
158 mc
159
160
161 Magic-cookie. Some terminals (notably older Wyses) can only
162 support one attribute without magic-cookie lossage. Their
163 base entry is usually paired with another that has this
164 suffix and uses magic cookies to support multiple
165 attributes.
166
167
168 -am
169
170
171 Enable auto-margin (right-margin wraparound)
172
173
174 -m
175
176
177 Mono mode - suppress color support
178
179
180 -na
181
182
183 No arrow keys - termcap ignores arrow keys which are
184 actually there on the terminal, so the user can use the
185 arrow keys locally.
186
187
188 -nam
189
190
191 No auto-margin - suppress am capability
192
193
194 -nl
195
196
197 No labels - suppress soft labels
198
199
200 -nsl
201
202
203 No status line - suppress status line
204
205
206 -pp
207
208
209 Has a printer port which is used.
210
211
212 -rv
213
214
215 Terminal in reverse video mode (black on white)
216
217
218 -s
219
220
221 Enable status line.
222
223
224 -vb
225
226
227 Use visible bell (flash) rather than beep.
228
229
230 -w
231
232
233 Wide; terminal is in 132 column mode.
234
235
236 Conventionally, if your terminal type is a variant intended
237 to specify a line height, that suffix should go first. So,
2 perry 238 for a hypothetical !FuBarCo model 2317 terminal in 30-line
1 perry 239 mode with reverse video, best form would be
240 __fubar-30-rv__ (rather than, say,
241 `fubar-rv-30').
242
243
244 Terminal types that are written not as standalone entries,
245 but rather as components to be plugged into other entries
246 via __use__ capabilities, are distinguished by using
247 embedded plus signs rather than dashes.
248
249
250 Commands which use a terminal type to control display often
251 accept a -T option that accepts a terminal name argument.
252 Such programs should fall back on the __TERM__
253 environment variable when no -T option is
254 specified.
255 !!PORTABILITY
256
257
258 For maximum compatibility with older System V UNIXes, names
259 and aliases should be unique within the first 14
260 characters.
261 !!FILES
262
263
264 /usr/share/terminfo/?/*
265
266
267 compiled terminal capability data base
268
269
270 /etc/inittab
271
272
273 tty line initialization (AT
274
275
276 /etc/ttys
277
278
279 tty line initialization (BSD-like UNIXes).
280 !!SEE ALSO
281
282
283 __curses__(3X), terminfo(5),
284 term(5).
285 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.