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