term.7 9.4 KB

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