BSD 2 development
[unix-history] / man / tset.u
CommitLineData
b0a04a8a
EA
1.TH TSET UCB 3/1/79 UCB
2.SH NAME
3tset \- set terminal modes
4.SH SYNOPSIS
5.B tset
6[
7.B \-
8] [
9.B \-r
10] [
11.B \-e
12] [
13.B \-E
14] [
15.B \-k
16] [
17.B \-d
18.I type
19] [
20.B \-p
21.I type
22] [
23.B \-b
24.I type
25] [
26.B \-h
27] [
28.I type
29]
30.SH DESCRIPTION
31.I Tset
32causes terminal dependent processing such as setting
33erase and kill characters, setting or resetting delays,
34and the like.
35It is driven by the
36.I /etc/ttytype
37and
38.I /etc/termcap
39files.
40.PP
41The type of terminal is specified by the
42.I type
43argument.
44The type may be any type given in
45.I /etc/termcap.
46If
47.I type
48is not specified,
49the terminal type is read from
50the environment
51unless some of the
52.B \-h,
53.B \-d,
54.B \-b,
55or
56.B \-p
57flags are set.
58In this case
59the type is read from
60.I /etc/ttytype
61(the terminal code to terminal type database).
62The terminal id is specified by a
63.IR ttyn (3)
64call on the diagnostic output.
65.PP
66If the type turns out to be a dialup and the
67.B \-d
68flag is specified,
69the terminal type is taken to be the named type.
70Similarly,
71if the type turns out to be a plugboard
72and the
73.B \-p
74flag is specified,
75the terminal type assumed is taken to be
76.I type .
77The same applies the the
78.B \-b
79flag on a bussiplexer port.
80.PP
81On terminals that can backspace but not overstrike
82(such as a \s-2CRT\s0)
83the erase character is changed to a Control-H
84(backspace).
85The
86.B \-e
87flag sets the erase character to be the named character
88.I c
89on all terminals,
90so to override this option one can say
91.BR \-e #.
92The default for
93.I c
94is Control-H.
95The
96.B \-k
97option works similarly,
98with
99.I c
100defaulting to Control-X.
101No kill processing is done if
102.B \-k
103is not specified.
104.PP
105The
106.B \-
107option prints the terminal type
108on the standard output.
109.PP
110The
111.B \-r
112option prints the terminal type
113on the diagnostic output.
114.PP
115.I Tset
116is most useful when included in the
117.B \&.login
118file executed automatically at login,
119with
120.B \-d
121used to specify the terminal type you most frequently dial in on.
122.SH EXAMPLE
123tset -dti733 -e -k!
124.br
125.if \n(V7 setenv TERM `tset -dadm3a - -e# -r`
126.br
127tset gt42
128.SH FILES
129.DT
130/etc/ttytype Terminal id to type map database
131.br
132/etc/termcap Terminal capability database
133.SH SEE\ ALSO
134setenv (in csh (UCB))
135.SH AUTHOR
136Eric P. Allman