blob: 84d100d840ca448e08f5debd49ee51b8b5b97b91 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2011,2017 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
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.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: term.7,v 1.48 2024/03/16 15:35:01 tom Exp $
31.TH term 7 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" 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.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053043.ds d @TERMINFO@
44.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040045term \-
46conventions for naming terminal types
47.\"SH SYNOPSIS
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040049The environment variable \fITERM\fP should normally contain the type
50name of the terminal,
51console or display-device type you are using.
52This information
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053053is critical for all screen-oriented programs, including your editor and mailer.
54.PP
micky3879b9f5e72025-07-08 18:04:53 -040055A default \fITERM\fP value will be set on a per-line basis by either
56\fB/etc/inittab\fP (e.g., System\-V-like Unices)
57or \fB/etc/ttys\fP (BSD Unices).
Steve Kondikae271bc2015-11-15 02:50:53 +010058This will nearly always suffice for workstation and microcomputer consoles.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053059.PP
micky3879b9f5e72025-07-08 18:04:53 -040060If you use a dialup line, the type of device attached to it may vary.
61Older Unix systems pre-set a very dumb terminal type
62like \*(``dumb\*('' or \*(``dialup\*('' on dialup lines.
63Newer ones may pre-set \*(``vt100\*('', reflecting the prevalence of DEC
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053064VT100-compatible terminals and personal-computer emulators.
65.PP
micky3879b9f5e72025-07-08 18:04:53 -040066Modern telnets pass your \fITERM\fP environment variable from the local
67side to the remote one.
68There can be problems if the remote terminfo or termcap entry
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053069for your type is not compatible with yours, but this situation is rare and
micky3879b9f5e72025-07-08 18:04:53 -040070can almost always be avoided by explicitly exporting \*(``vt100\*(''
71(assuming you are in fact using a VT100-superset console,
72terminal, or terminal emulator).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053073.PP
micky3879b9f5e72025-07-08 18:04:53 -040074In any case, you are free to override the system \fITERM\fP setting to
75your taste in your shell profile.
76The \fB@TSET@\fP(1) utility may be of assistance;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053077you can give it a set of rules for deducing or requesting a terminal type based
78on the tty device and baud rate.
79.PP
micky3879b9f5e72025-07-08 18:04:53 -040080Setting your own \fITERM\fP value may also be useful if you have created
81a custom entry incorporating options
82(such as visual bell or reverse-video)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053083which you wish to override the system default type for your line.
84.PP
85Terminal type descriptions are stored as files of capability data underneath
micky3879b9f5e72025-07-08 18:04:53 -040086\*d.
87To browse a list of all terminal names recognized by the system, do
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053088.sp
micky3879b9f5e72025-07-08 18:04:53 -040089 @TOE@ | more
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053090.sp
micky3879b9f5e72025-07-08 18:04:53 -040091from your shell.
92These capability files are in a binary format optimized for
93retrieval speed (unlike the old text-based \fBtermcap\fP format they replace);
94to examine an entry, you must use the \fB@INFOCMP@\fP(1M) command.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053095Invoke it as follows:
96.sp
micky3879b9f5e72025-07-08 18:04:53 -040097 @INFOCMP@ \fIentry_name\fP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053098.sp
micky3879b9f5e72025-07-08 18:04:53 -040099where \fIentry_name\fP is the name of the type you wish to examine (and the
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530100name of its capability file the subdirectory of \*d named for its first
micky3879b9f5e72025-07-08 18:04:53 -0400101letter).
102This command dumps a capability file in the text format described by
103\fBterminfo\fP(5).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530104.PP
micky3879b9f5e72025-07-08 18:04:53 -0400105The first line of a \fBterminfo\fP(5) description gives the names by which
106terminfo knows a terminal,
107separated by \*(``|\*('' (pipe-bar) characters with the last
108name field terminated by a comma.
109The first name field is the type's
110\fIprimary name\fP,
111and is the one to use when setting \fITERM\fP.
112The last name field
113(if distinct from the first)
114is actually a description of the
115terminal type (it may contain blanks; the others must be single words).
116Name
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530117fields between the first and last (if present) are aliases for the terminal,
118usually historical names retained for compatibility.
119.PP
120There are some conventions for how to choose terminal primary names that help
micky3879b9f5e72025-07-08 18:04:53 -0400121keep them informative and unique.
122Here is a step-by-step guide to naming
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530123terminals that also explains how to parse them:
124.PP
micky3879b9f5e72025-07-08 18:04:53 -0400125First, choose a root name.
126The root will consist of a lower-case letter
127followed by up to seven lower-case letters or digits.
128You need to avoid using
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530129punctuation characters in root names, because they are used and interpreted as
130filenames and shell meta-characters (such as !, $, *, ?, etc.) embedded in them
micky3879b9f5e72025-07-08 18:04:53 -0400131may cause odd and unhelpful behavior.
132The slash (/), or any other character
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530133that may be interpreted by anyone's file system (\e, $, [, ]), is especially
134dangerous (terminfo is platform-independent, and choosing names with special
micky3879b9f5e72025-07-08 18:04:53 -0400135characters could someday make life difficult for users of a future port).
136The
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530137dot (.) character is relatively safe as long as there is at most one per root
138name; some historical terminfo names use it.
139.PP
140The root name for a terminal or workstation console type should almost always
micky3879b9f5e72025-07-08 18:04:53 -0400141begin with a vendor prefix (such as \fBhp\fP for Hewlett-Packard, \fBwy\fP for
142Wyse, 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
144Microsystems workstation consoles, or \fBregent\fP for the ADDS Regent series.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530145You can list the terminfo tree to see what prefixes are already in common use.
146The root name prefix should be followed when appropriate by a model number;
micky3879b9f5e72025-07-08 18:04:53 -0400147thus \fBvt100\fP, \fBhp2621\fP, \fBwy50\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530148.PP
149The root name for a PC-Unix console type should be the OS name,
micky3879b9f5e72025-07-08 18:04:53 -0400150i.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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530152multi-platform environment! If a model number follows, it should indicate
153either the OS release level or the console driver release level.
154.PP
155The root name for a terminal emulator (assuming it does not fit one of the
156standard ANSI or vt100 types) should be the program name or a readily
micky3879b9f5e72025-07-08 18:04:53 -0400157recognizable abbreviation of it (i.e., \fBversaterm\fP, \fBctrm\fP).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530158.PP
159Following the root name, you may add any reasonable number of hyphen-separated
160feature suffixes.
161.TP 5
1622p
micky3879b9f5e72025-07-08 18:04:53 -0400163Has two pages of memory.
164Likewise 4p, 8p, etc.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530165.TP 5
166mc
micky3879b9f5e72025-07-08 18:04:53 -0400167Magic-cookie.
168Some terminals (notably older Wyses) can only support one
169attribute without magic-cookie lossage.
170Their base entry is usually paired
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530171with another that has this suffix and uses magic cookies to support multiple
172attributes.
173.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100174\-am
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530175Enable auto-margin (right-margin wraparound).
176.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100177\-m
178Mono mode \- suppress color support.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530179.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100180\-na
181No arrow keys \- termcap ignores arrow keys which are actually there on the
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530182terminal, so the user can use the arrow keys locally.
183.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100184\-nam
185No auto-margin \- suppress am capability.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530186.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100187\-nl
188No labels \- suppress soft labels.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530189.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100190\-nsl
191No status line \- suppress status line.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530192.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100193\-pp
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530194Has a printer port which is used.
195.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100196\-rv
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530197Terminal in reverse video mode (black on white).
198.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100199\-s
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530200Enable status line.
201.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100202\-vb
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530203Use visible bell (flash) rather than beep.
204.TP 5
Steve Kondikae271bc2015-11-15 02:50:53 +0100205\-w
micky3879b9f5e72025-07-08 18:04:53 -0400206Wide; terminal is in 132-column mode.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530207.PP
208Conventionally, if your terminal type is a variant intended to specify a
micky3879b9f5e72025-07-08 18:04:53 -0400209line height, that suffix should go first.
210So, for a hypothetical FuBarCo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530211model 2317 terminal in 30-line mode with reverse video, best form would be
micky3879b9f5e72025-07-08 18:04:53 -0400212\fBfubar\-30\-rv\fP (rather than, say, \*(``fubar\-rv\-30\*('').
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530213.PP
214Terminal types that are written not as standalone entries, but rather as
215components to be plugged into other entries via \fBuse\fP capabilities,
216are distinguished by using embedded plus signs rather than dashes.
217.PP
Steve Kondikae271bc2015-11-15 02:50:53 +0100218Commands which use a terminal type to control display often accept a \-T
micky3879b9f5e72025-07-08 18:04:53 -0400219option that accepts a terminal name argument.
220Such programs should fall back
221on the \fITERM\fP environment variable when no \-T option is specified.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530222.SH FILES
micky3879b9f5e72025-07-08 18:04:53 -0400223.TP
224.I \*d
225compiled terminal description database
226.TP
227.I /etc/inittab
228tty line initialization (AT&T-like Unices)
229.TP
230.I /etc/ttys
231tty line initialization (BSD-like Unices)
232.SH PORTABILITY
233For maximum compatibility with older System V Unices, names and aliases
234should be unique within the first 14 characters.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530235.SH SEE ALSO
micky3879b9f5e72025-07-08 18:04:53 -0400236\fB\%curses\fP(3X),
237\fB\%term\fP(5),
238\fB\%terminfo\fP(5)