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