p .Sh DESCRIPTION The .Nm driver provides support for machine independent access to the console.
p .Nm is made of a number of cooperating modules, in particular l -bullet t hardware support for display adapters, keyboards and mice, see .Xr wsdisplay 4 , .Xr wskbd 4 , and .Xr wsmouse 4 t terminal emulation modules (see below), and t compatibility options to support control operations and other low-level behaviour of existing terminal drivers (see below) .El
p .Em Terminal emulations: .Nm does not define an 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. The following choices are available: l -tag -width xxxxxx t dumb This minimal terminal support is available unless the kernel option .Cd options 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. t sun The .Dq sun console emulation is available if .Cd options 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. t vt100 is available with the kernel compile option .Cd options 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: l -bullet t .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) t Function keys are not reprogrammable and fonts can not be downloaded. DECUDK and DECDLD sequences will be ignored. t Neither C1 control set characters will be recognized nor will 8-bit keyboard codes be delivered. t The .Dq DEC supplemental graphic font is approximated by the ISO-latin-1 font, though there are subtle differences. t 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.
p Depending on the keyboard used, not all function keys might be available. .El
p In addition to the plain .Tn VT100 functions are supported: l -bullet t ANSI colors t Some .Tn VT220 -like presentation state settings and -reports (DECRSPS), especially tabulator settings. .El
p In most applications, .Nm will work sufficiently as a .Tn VT220 emulator. .El
p The .Cd 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 .Cd WSDISPLAY_DEFAULTSCREENS option (see .Xr wsdisplay 4 ), or if no emulation type was passed to the .Xr wsconscfg 8 utility.
p .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: l -tag -width xxxxxxxx t Cd WSDISPLAY_COMPAT_USL Support the protocol for switches between multiple virtual screens on one display as used by most PC-UNIX variants. t Cd WSDISPLAY_COMPAT_RAWKBD Allows to get raw XT keyboard scancodes from PC keyboards as needed by i386 X servers. t Cd WSDISPLAY_COMPAT_PCVT Emulates enough of the .Nx / i386 .Dq pcvt driver to make X servers work. t Cd WSDISPLAY_COMPAT_SYSCONS Emulates enough of the i386 FreeBSD .Dq syscons driver to make X servers work. Useful with FreeBSD binary emulation. .El
p Linux/i386 X servers do usually run if the first two options are enabled together with the .Nx Linux binary emulation.
p (To have programs looking for device special files of other console drivers find the .Nm driver entry points, symlinks are a helpful measure.)
p .Em Other options: l -tag -width xxxxxxxx t Cd options WS_KERNEL_FG=WSCOL_XXX , t Cd options WS_KERNEL_BG=WSCOL_XXX , t Cd options WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)" and t Cd options 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
a /dev/console or the specific tty device like
a /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
a /usr/include/wscons/wsdisplayvar.h . .Dq WS_KERNEL_COLATTR and .Dq WS_KERNEL_MONOATTR are additional attribute flags used on color resp. monochrome displays, 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. t Cd options 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 BUGS This man page is still extremely incomplete. .Sh SEE ALSO .Xr wsdisplay 4 , .Xr wskbd 4 , .Xr wsmouse 4 , .Xr wsconscfg 8 , .Xr wsconsctl 8 , .Xr wsfontload 8