xref: /netbsd/share/man/man4/wscons.4 (revision bf9ec67e)
1.\" $NetBSD: wscons.4,v 1.18 2001/11/29 23:14:39 ross 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.Pp
55.Cd "wsdisplay* at ..."
56.Cd "wskbd*     at ... mux N"
57.Cd "wsmouse*   at ... mux N"
58.Pp
59.Cd pseudo-device  wsmux    N
60.Sh DESCRIPTION
61The
62.Nm
63driver provides support for machine independent access to the console.
64.Pp
65.Nm
66is made of a number of cooperating modules, in particular
67.Bl -bullet
68.It
69hardware support for display adapters, keyboards and mice, see
70.Xr wsdisplay 4 ,
71.Xr wskbd 4 , and
72.Xr wsmouse 4
73.It
74input event multiplexor, see
75.Xr wsmux 4
76.It
77terminal emulation modules (see below), and
78.It
79compatibility options to support control operations and other low-level
80behaviour of existing terminal drivers (see below)
81.El
82.Ss Terminal emulations
83.Nm
84does not define its own set of terminal control sequences and special keyboard
85codes in terms of
86.Xr termcap 5 .
87Instead a
88.Dq terminal emulation
89is assigned to each virtual screen when the screen is created. (See
90.Xr wsconscfg 8 . )
91Different terminal emulations can be active at the same time on one display.
92The following choices are available:
93.Bl -tag -width xxxxxx
94.It dumb
95This minimal terminal support is available unless the kernel option
96.Cd options WSEMUL_NO_DUMB
97was specified at build time. No control sequences are supported besides
98the ASCII control characters. The cursor is not addressable. Only ASCII
99keyboard codes will be delivered, cursor and functions keys do not work.
100.It sun
101The
102.Dq sun
103console emulation is available if
104.Cd options WSEMUL_SUN
105was specified at kernel build time. It supports the control sequences of
106.Tn SUN
107machine consoles and delivers its keyboard codes for function and
108keypad keys in use.
109This emulation is sufficient for full-screen applications.
110.It vt100
111is available with the kernel compile option
112.Cd options WSEMUL_VT100 .
113It provides the most commonly used functions of
114.Tn DEC VT100
115terminals with some extensions introduced by the
116.Tn DEC VT220
117and
118.Tn DEC VT320
119models. The features of the original
120.Tn VT100
121which are not or not completely implemented are:
122.Bl -bullet
123.It
124.Tn VT52
125support, 132-column-mode, smooth scroll, light background, keyboard
126autorepeat control, external printer support, keyboard locking,
127newline/linefeed switching: Escape sequences related
128to these features are ignored or answered with standard replies.
129(DECANM, DECCOLM, DECSCLM, DECSCNM, DECARM, DECPFF, DECPEX, KAM, LNM)
130.It
131Function keys are not reprogrammable and fonts can not be downloaded.
132DECUDK and DECDLD sequences will be ignored.
133.It
134Neither C1 control set characters will be recognized nor will 8-bit keyboard
135codes be delivered.
136.It
137The
138.Dq DEC supplemental graphic
139font is approximated by the ISO-latin-1 font, though there are
140subtle differences.
141.It
142The actual rendering quality depends on the underlying graphics hardware
143driver. Characters might be missing in the available fonts and be
144substituted by more or less fitting replacements.
145.Pp
146Depending on the keyboard used, not all function keys might be available.
147.El
148.Pp
149In addition to the plain
150.Tn VT100
151functions are supported:
152.Bl -bullet
153.It
154ANSI colors.
155.It
156Some
157.Tn VT220
158-like presentation state settings and -reports (DECRSPS), especially
159tabulator settings.
160.El
161.Pp
162In most applications,
163.Nm
164will work sufficiently as a
165.Tn VT220
166emulator.
167.El
168.Pp
169The
170.Va WSEMUL_DEFAULT
171kernel option is used to select one of the described terminal options
172as the default choice. The default takes effect at kernel startup, i.e.
173for the operating system console or additional screens allocated
174through the
175.Va WSDISPLAY_DEFAULTSCREENS
176option (see
177.Xr wsdisplay 4 ) ,
178or if no emulation type was passed to the
179.Xr wsconscfg 8
180utility.
181.Ss Compatibility options
182these options allow X servers and other programs using low-level
183console driver functions which were written specifically for other
184console drivers to run on
185.Nx
186systems. The options are in particular:
187.Bl -tag -width xxxxxxxx
188.It Cd WSDISPLAY_COMPAT_USL
189Support the protocol for switches between multiple virtual screens on
190one display as used by most PC-UNIX variants.
191.It Cd WSDISPLAY_COMPAT_RAWKBD
192Allows to get raw XT keyboard scancodes from PC keyboards as needed
193by i386 X servers.
194.It Cd WSDISPLAY_COMPAT_PCVT
195Emulates enough of the
196.Nx Ns /i386
197.Dq pcvt
198driver to make X servers work.
199.It Cd WSDISPLAY_COMPAT_SYSCONS
200Emulates enough of the
201.Fx
202.Dq syscons
203driver to make X servers work. Useful with
204.Fx
205binary emulation.
206.El
207.Pp
208Linux/i386 X servers usually run successfully if the first two options are
209enabled together with the
210.Nx
211Linux binary emulation.
212.Pp
213(To have programs looking for device special files of other console drivers
214find the
215.Nm
216driver entry points, symlinks are a helpful measure.)
217.Ss Other options
218.Bl -tag -width xxxxxxxx
219.It Cd options WS_KERNEL_FG=WSCOL_XXX ,
220.It Cd options WS_KERNEL_BG=WSCOL_XXX ,
221.It Cd options \&WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)"
222and
223.It Cd options \&WS_KERNEL_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"
224allow to make console output originating from the kernel appear differently
225than output from user level programs (via
226.Pa /dev/console
227or the specific tty
228device like
229.Pa /dev/ttyE0 ) .
230.Dq WS_KERNEL_FG
231and
232.Dq WS_KERNEL_BG
233set the foreground / background used on color displays. The
234.Dq WSCOL_XXX
235arguments are colors as defined in
236.Pa /usr/include/dev/wscons/wsdisplayvar.h .
237.Dq WS_KERNEL_COLATTR
238and
239.Dq WS_KERNEL_MONOATTR
240are additional attribute flags used on color or monochrome displays,
241respectively.
242The arguments are defined in the same header file. Whether the attributes
243are supported or not depends on the actually used graphics adapter.
244These options are ignored by the
245.Dq dumb
246terminal emulation.
247.It Cd options WSCOMPAT_USL_SYNCTIMEOUT=nnn
248The virtual screen switching protocol enabled by
249.Dq WSDISPLAY_COMPAT_USL
250uses a somewhat complex handshake protocol to pass control to user programs
251such as X servers controlling a virtual screen. In order
252to prevent a non-responsive
253application from locking the whole console system,
254a screen switch will be rolled
255back after a 5 second timeout if the application does not respond.
256This option can be used to specify in seconds a different timeout value.
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