1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
.\" $OpenBSD: wscons.4,v 1.2 2000/09/17 00:53:35 aaron Exp $
.\" $NetBSD: wscons.4,v 1.11 2000/04/13 11:14:42 is Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 26, 1998
.Dt WSCONS 4
.Os
.Sh NAME
.Nm wscons
.Nd console access
.Sh SYNOPSIS
.Cd option WSEMUL_SUN
.Cd option WSEMUL_VT100
.Cd option WSEMUL_NO_DUMB
.Cd option \&"WSEMUL_DEFAULT=\e"xxx\e""
.Cd option WS_KERNEL_FG=WSCOL_XXX
.Cd option WS_KERNEL_BG=WSCOL_XXX
.Cd option WSDISPLAY_COMPAT_PCVT
.Cd option WSDISPLAY_COMPAT_SYSCONS
.Cd option WSDISPLAY_COMPAT_USL
.Cd option WSDISPLAY_COMPAT_RAWKBD
.Cd "wsdisplay* at ..."
.Cd "wskbd* at ... mux N"
.Cd "wsmouse* at ... mux N"
.Cd pseudo-device wsmux N
.Pp
.Sh DESCRIPTION
The
.Nm
driver provides support for machine-independent access to the console.
.Pp
.Nm
is made of a number of cooperating modules, in particular
.Bl -bullet
.It
Hardware support for display adapters, keyboards and mice; see
.Xr wsdisplay 4 ,
.Xr wskbd 4 ,
and
.Xr wsmouse 4 .
.It
Input event multiplexor; see
.Xr wsmux 4 .
.It
Terminal emulation modules (see below).
.It
Compatibility options to support control operations and other low-level
behaviour of existing terminal drivers (see below).
.El
.Ss Terminal emulations
.Nm
does not define its own set of terminal control sequences and special keyboard
codes in terms of
.Xr termcap 5 .
Instead, a
.Dq terminal emulation
is assigned to each virtual screen when the screen is created (see
.Xr wsconscfg 8 ).
Different terminal emulations can be active at the same time on one display.
.Pp
The following choices are available:
.Bl -tag -width xxxxxx
.It dumb
This minimal terminal support is available unless the kernel option
.Cd option WSEMUL_NO_DUMB
was specified at build time.
No control sequences are supported besides the ASCII control characters.
The cursor is not addressable.
Only ASCII keyboard codes will be delivered, cursor and functions keys
do not work.
.It sun
The
.Dq sun
console emulation is available if
.Cd option WSEMUL_SUN
was specified at kernel build time.
It supports the control sequences of
.Tn SUN
machine consoles and delivers its keyboard codes for function and
keypad keys (as far as present on the actually used keyboard).
This emulation is sufficient for full-screen applications.
.It vt100
is available with the kernel compile option
.Cd option WSEMUL_VT100 .
It provides the most commonly used functions of
.Tn DEC VT100
terminals with some extensions introduced by the
.Tn DEC VT220
and
.Tn DEC VT320
models.
The features of the original
.Tn VT100
which are not or not completely implemented are:
.Bl -bullet
.It
.Tn VT52
support, 132-column-mode, smooth scroll, light background, keyboard
autorepeat control, external printer support, keyboard locking,
newline/linefeed switching: Escape sequences related
to these features are ignored or answered with standard replies.
(DECANM, DECCOLM, DECSCLM, DECSCNM, DECARM, DECPFF, DECPEX, KAM, LNM)
.It
Function keys are not reprogrammable and fonts can not be downloaded.
DECUDK and DECDLD sequences will be ignored.
.It
Neither C1 control set characters will be recognized nor will 8-bit keyboard
codes be delivered.
.It
The
.Dq DEC supplemental graphic
font is approximated by the ISO-latin-1 font, though there are
subtle differences.
.It
The actual rendering quality depends on the underlying graphics
hardware driver.
Characters might be missing in the available fonts and be
substituted by more or less fitting replacements.
.Pp
Depending on the keyboard used, not all function keys might be available.
.El
.Pp
In addition to the plain
.Tn VT100
functions are supported:
.Bl -bullet
.It
ANSI colors
.It
Some
.Tn VT220
-like presentation state settings and -reports (DECRSPS), especially
tabulator settings.
.El
.Pp
In most applications,
.Nm
will work sufficiently as a
.Tn VT220
emulator.
.El
.Pp
The
.Va WSEMUL_DEFAULT
kernel option allows to select one of the described terminal options
as default choice.
The default gets into effect in kernel startup, i.e.,
for the operating system console or additional screens allocated
through the
.Va WSDISPLAY_DEFAULTSCREENS
option (see
.Xr wsdisplay 4
), or if no emulation type was passed to the
.Xr wsconscfg 8
utility.
.Pp
.Em Compatibility options:
these options allow to run X servers or other programs using low-level
console driver functions which were written specifically for other
console drivers to run on
.Nx
systems.
The options are in particular:
.Bl -tag -width xxxxxxxx
.It Cd WSDISPLAY_COMPAT_USL
Support the protocol for switches between multiple virtual screens on
one display as used by most PC-UNIX variants.
.It Cd WSDISPLAY_COMPAT_RAWKBD
Allows to get raw XT keyboard scancodes from PC keyboards as needed
by i386 X servers.
.It Cd WSDISPLAY_COMPAT_PCVT
Emulates enough of the
.Nx
/ i386
.Dq pcvt
driver to make X servers work.
.It Cd WSDISPLAY_COMPAT_SYSCONS
Emulates enough of the i386 FreeBSD
.Dq syscons
driver to make X servers work.
Useful with FreeBSD binary emulation.
.El
.Pp
Linux/i386 X servers do usually run if the first two options are
enabled together with the
.Nx
Linux binary emulation.
.Pp
(To have programs looking for device special files of other console drivers
find the
.Nm
driver entry points, symlinks are a helpful measure.)
.Pp
.Em Other options:
.Bl -tag -width xxxxxxxx
.It Cd option WS_KERNEL_FG=WSCOL_XXX ,
.It Cd option WS_KERNEL_BG=WSCOL_XXX ,
.It Cd option \&WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)"
and
.It Cd option \&WS_KERNEL_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"
allow to make console output originating from the kernel appear differently
than output from user level programs (via
.Pa /dev/console
or the specific tty
device like
.Pa /dev/ttyE0
).
.Dq WS_KERNEL_FG
and
.Dq WS_KERNEL_BG
set the foreground / background used on color displays.
The
.Dq WSCOL_XXX
arguments are colors as defined in
.Pa /usr/include/wscons/wsdisplayvar.h .
.Dq WS_KERNEL_COLATTR
and
.Dq WS_KERNEL_MONOATTR
are additional attribute flags used on color or monochrome displays,
respectively.
The arguments are defined in the same header file.
Whether the attributes
are supported or not depends on the actually used graphics adapter.
These options are ignored by the
.Dq dumb
terminal emulation.
.It Cd option WSCOMPAT_USL_SYNCTIMEOUT=nnn
The virtual screen switching protocol enabled by
.Dq WSDISPLAY_COMPAT_USL
uses a somewhat complex handshake protocol to pass control to user programs
as X servers controlling a virtual screen.
To avoid a non-responsive application to lock the whole console system a
screen switch will be rolled back if the user application does not respond
to a screen switch request within some time.
This option allows to set this timeout (in seconds),
the default value is 5 seconds.
.El
.Sh SEE ALSO
.Xr wsdisplay 4 ,
.Xr wskbd 4 ,
.Xr wsmouse 4 ,
.Xr wsmux 4 ,
.Xr wsconscfg 8 ,
.Xr wsconsctl 8 ,
.Xr wsfontload 8
|