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