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