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