source: trunk/minix/man/man1/stty.1@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 4.8 KB
Line 
1.TH STTY 1
2.SH NAME
3stty \- set terminal parameters
4.SH SYNOPSIS
5.de SP
6.if t .sp 0.4
7.if n .sp
8..
9.in +4n
10.ti -4n
11.B stty
12.RB [ \-ag]
13.SP
14.ti -4n
15.B stty
16.I encoded-form
17.SP
18.ti -4n
19.B stty
20.I speed
21.B ispeed
22.I speed
23.B ospeed
24.I speed
25.B "cs5 cs6 cs7 cs8"
26.RB [ \- ] parenb
27.RB [ \- ] parodd
28.RB [ \- ] hupcl
29.RB [ \- ] cstopb
30.RB [ \- ] cread
31.RB [ \- ] clocal
32.RB [ \- ] ignbrk
33.RB [ \- ] brkint
34.RB [ \- ] ignpar
35.RB [ \- ] parmrk
36.RB [ \- ] inpck
37.RB [ \- ] istrip
38.RB [ \- ] inlcr
39.RB [ \- ] igncr
40.RB [ \- ] icrnl
41.RB [ \- ] ixon
42.RB [ \- ] ixoff
43.RB [ \- ] ixany
44.RB [ \- ] opost
45.RB [ \- ] onlcr
46.RB [ \- ] xtabs
47.RB [ \- ] onoeot
48.RB [ \- ] isig
49.RB [ \- ] icanon
50.RB [ \- ] iexten
51.RB [ \- ] echo
52.RB [ \- ] echoe
53.RB [ \- ] echok
54.RB [ \- ] echonl
55.RB [ \- ] noflsh
56.RB [ \- ] tostop
57.RB [ \- ] lflusho
58.BR eof =\fIc
59.BR eol =\fIc
60.BR erase =\fIc
61.BR erase =\fIc
62.BR intr =\fIc
63.BR kill =\fIc
64.BR quit =\fIc
65.BR susp =\fIc
66.BR start =\fIc
67.BR stop =\fIc
68.BR rprnt =\fIc
69.BR lnext =\fIc
70.BR flush =\fIc
71.BR min =\fIn
72.BR time =\fIn
73.B rows
74.I n
75.B cols
76.I n
77.B xpixels
78.I n
79.B ypixels
80.I n
81.B cooked
82.B raw
83.RB [ \- ] evenp
84.RB [ \- ] parity
85.RB [ \- ] oddp
86.RB [ \- ] nl
87.B ek
88.B sane
89.in -4n
90.SH DESCRIPTION
91.B Stty
92shows or changes the parameters of the terminal connected to standard input.
93.B Stty
94takes a myriad of arguments most of which are mapped directly to
95the flags and special characters described in
96.BR tty (4),
97so we won't describe them here.
98.PP
99.B Stty
100has three forms of operation. First, without any arguments
101.B stty
102shows all terminal attributes that are different from the default state.
103Option
104.B \-a
105makes
106.B stty
107print all terminal attributes, and
108.B \-g
109lets
110.B stty
111print the attributes in a special encoded form, a simple row of colon separated
112hexadecimal numbers.
113.PP
114In the second form of operation
115.B stty
116takes an encoded form as produced by the
117.B \-g
118option and sets the terminals attributes to its decoded value.
119.PP
120In the third form
121.B stty
122interprets a series of flags and parameters settings and modifies the
123terminal attributes accordingly. Flags can be given as
124.B icanon
125or
126.B \-icanon
127for instance, either setting or clearing the
128.B ICANON
129flag.
130Special character values can by set like
131.B "intr=^C"
132for example, which sets the interrupt character to CTRL-C. You can either
133use a real CTRL-C, or the two characters `^' and `C'. In any case
134it is probably necessary to use quotes to guard it from the shell:
135.BR "intr='^C'" .
136.PP
137A number alone is interpreted as a baud rate setting for both the input and
138output rate. The input or the output rate can be set separately with use
139of the
140.B ispeed
141and
142.B ospeed
143prefixes to the number. The character size can be set with
144.BR cs5 ,
145.BR cs6 ,
146.BR cs7
147or
148.BR cs8 .
149.PP
150The
151.B MIN
152and
153.B TIME
154value, the number of rows and columns, and the xpixels and ypixels of the
155window can also be set using one of the keywords
156.BR min ,
157.BR time ,
158.BR rows ,
159.BR cols ,
160.BR xpixels
161or
162.BR ypixels ,
163followed by a decimal number that is the value of the setting.
164.PP
165.B Stty
166accepts several keywords that are not named by corresponding flags or
167parameters in
168.BR tty (4).
169They set several attributes at once:
170.TP
171.B cooked
172Same as
173.BR "icrnl ixon opost onlcr isig icanon iexten echo" ,
174setting all the attributes that are needed for line oriented mode.
175.TP
176.B raw
177Same as
178.BR "\-icrnl \-ixon \-opost \-onlcr \-isig \-icanon \-iexten \-echo" ,
179setting all the attributes for a raw data channel.
180.TP
181.B evenp parity
182These synonyms are equal to
183.BR "cs7 parenb \-parodd" ,
184setting the line to 7 bits even parity.
185.TP
186.B oddp
187Same as
188.BR "cs7 parenb parodd" ,
189setting the line to 7 bits odd parity.
190.TP
191.B "\-parity \-evenp \-oddp"
192All synonyms for
193.BR "cs8 \-parenb" ,
194setting the line to 8 bits, no parity.
195.TP
196.B nl
197Same as
198.BR icrnl ,
199setting carriage return to line feed input translation.
200.TP
201.B \-nl
202Same as
203.BR "\-icrnl \-inlcr \-igncr" ,
204disabling any carriage return or line feed handling.
205.TP
206.B ek
207Set the
208.B ERASE
209and
210.B KILL
211special characters back to the default.
212.TP
213.B sane
214Set all attributes to the default except things like the line speed and
215parity, because their "sane" value is probably what it is right now.
216The default values are compiled into
217.B stty
218from the <termios.h> include file. Use
219.B "stty sane; stty -a"
220to know what they are.
221.SH FILES
222.TP 15n
223.B /etc/ttytab
224The
225.B init
226field of this file may contain an
227.B stty
228command to set the attributes to match an attached RS232 terminal or modem.
229.SH "SEE ALSO"
230.BR tty (4),
231.BR ttytab (5).
232.SH NOTES
233The
234.BR cooked ,
235.BR raw ,
236.BR rows ,
237.BR cols ,
238.BR xpixels
239and
240.BR ypixels
241keywords are MINIX 3 additions beyond the keywords defined by POSIX.
242.B Rows
243and
244.B cols
245are common UNIX extensions, however.
246There are more MINIX 3 specific flags that match the MINIX 3 specific attributes
247described in
248.BR tty (4).
249.SH AUTHOR
250Kees J. Bot <kjb@cs.vu.nl>
Note: See TracBrowser for help on using the repository browser.