WSCONS(4)
π NAME π
wscons β workstation console access
okay so bestie, this is the WSCONS(4) page from the Kernel Interfaces Manual, and it's literally all about the wscons driver giving you machine independent access to the console. iconic behavior, no cap. π
β¨ SYNOPSIS β¨
here's the config layout, copy it exactly or the kernel will simply not get the vibe:
wsdisplay* at ...
wskbd* at ... mux N
wsmouse* at ... mux N
pseudo-device wsmux
options WSEMUL_SUN
options WSEMUL_VT100
options WSEMUL_NO_DUMB
options WSEMUL_DEFAULT="xxx"
options WS_DEFAULT_FG=WSCOL_XXX
options WS_DEFAULT_BG=WSCOL_XXX
options WS_DEFAULT_COLATTR="(WSATTR_XXX | WSATTR_YYY)"
options WS_DEFAULT_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"
options WS_KERNEL_FG=WSCOL_XXX
options WS_KERNEL_BG=WSCOL_XXX
options WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)"
options WS_KERNEL_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"
options WSDISPLAY_COMPAT_PCVT
options WSDISPLAY_COMPAT_SYSCONS
options WSDISPLAY_COMPAT_USL
options WSCOMPAT_USL_SYNCTIMEOUT=nnn
options WSDISPLAY_COMPAT_RAWKBD
options WSKBD_EVENT_AUTOREPEAT
options WSKBD_USONLY
π DESCRIPTION π
the wscons driver provides support for machine independent access to the console. slay.
wscons is made of a number of cooperating modules, in particular:
- hardware support for display adapters, keyboards and mice β see
wsdisplay(4),wskbd(4), andwsmouse(4)π - input event multiplexor β see
wsmux(4)π¦ - terminal emulation modules (see below), and
- compatibility options to support control operations and other low-level behaviour of existing terminal drivers (see below) β¨
π₯οΈ Terminal emulations π₯οΈ
okay so here's the tea: wscons does not define its own set of terminal control sequences and special keyboard codes in terms of terminfo(5). instead a βterminal emulationβ is assigned to each virtual screen when the screen is created. (See wsconscfg(8).) different terminal emulations can be active at the same time on one display. the following choices are available:
dumbβ this minimal terminal support is available unless the kernel optionoptions WSEMUL_NO_DUMBwas 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. πsunβ the βsunβ console emulation is available ifoptions WSEMUL_SUNwas specified at kernel build time. it supports the control sequences of SUN machine consoles and delivers its keyboard codes for function and keypad keys in use. this emulation is sufficient for full-screen applications. πvt100β available with the kernel compile optionoptions WSEMUL_VT100. it provides the most commonly used functions of DEC VT100 terminals with some extensions introduced by the DEC VT220 and DEC VT320 models. the features of the original VT100 which are not or not completely implemented are:- 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) π - function keys are not reprogrammable and fonts can not be downloaded.
DECUDKandDECDLDsequences will be ignored. π - neither C1 control set characters will be recognized nor will 8-bit keyboard codes be delivered. π
- the βDEC supplemental graphicβ font is approximated by the ISO-latin-1 font, though there are subtle differences. πΈ
- 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. π«Ά
- 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. (
depending on the keyboard used, not all function keys might be available.
in addition to the plain VT100 functions are supported:
- ANSI colors. π
- some VT220-like presentation state settings and -reports (
DECRSPS), especially tabulator settings. β¨
in most applications, wscons will work sufficiently as a VT220 emulator. periodt.
the WSEMUL_DEFAULT kernel option is used to select one of the described terminal options as the default choice. the default takes effect at kernel startup, i.e. for the operating system console or additional screens allocated through the WSDISPLAY_DEFAULTSCREENS option (see wsdisplay(4)), or if no emulation type was passed to the wsconscfg(8) utility. iykyk.
π Compatibility options π
these options allow X servers and other programs using low-level console driver functions usually written specifically for other console drivers to run on NetBSD systems. the options are in particular:
WSDISPLAY_COMPAT_USLβ support the protocol for switches between multiple virtual screens on one display as used by most PC-UNIX variants. this is used by the NetBSDwsconscfg(8)utility. π₯WSDISPLAY_COMPAT_RAWKBDβ allows to get raw XT keyboard scancodes from PC keyboards as needed by i386 X servers. πWSDISPLAY_COMPAT_PCVTβ emulates enough of the NetBSD/i386 βpcvtβ driver to make X servers work. π₯οΈWSDISPLAY_COMPAT_SYSCONSβ emulates enough of the FreeBSD βsysconsβ driver to make X servers work. useful with FreeBSD binary emulation. π¦
Linux/i386 X servers usually run successfully if the first two options are enabled together with the NetBSD Linux binary emulation. bestie, that's the combo meal. π
(to have programs looking for device special files of other console drivers find the wscons driver entry points, symlinks are a helpful measure.) π‘
πΈ Other options πΈ
options WS_DEFAULT_FG=WSCOL_XXXβ sets the foreground used on color displays for default console output. πoptions WS_DEFAULT_BG=WSCOL_XXXβ sets the background used on color displays for default console output. πoptions WS_DEFAULT_COLATTR="(WSATTR_XXX | WSATTR_YYY)"β additional attribute flags used on color displays. β¨options WS_DEFAULT_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"β additional attribute flags used on monochrome displays. β¨
these make default console output appear in specific colors and attributes. WS_DEFAULT_FG and WS_DEFAULT_BG set the foreground and background used on color displays. WS_DEFAULT_COLATTR and WS_DEFAULT_MONOATTR are additional attribute flags used on color or monochrome displays, respectively. whether the attributes are supported or not depends on the actually used graphics adapter. these options are ignored by the βdumbβ terminal emulation. π
see src/sys/dev/wscons/wsdisplayvar.h for available WSCOL_XXX and WSATTR_XXX values. iykyk.
options WS_KERNEL_FG=WSCOL_XXXβ kernel-output foreground on color displays. πoptions WS_KERNEL_BG=WSCOL_XXXβ kernel-output background on color displays. πoptions WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)"β kernel-output extra attributes on color displays. π«Άoptions WS_KERNEL_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"β kernel-output extra attributes on monochrome displays. π«Ά
these make console output originating from the kernel appear differently than output from user level programs (via /dev/console or the specific tty device like /dev/ttyE0). their meaning is the same as their WS_DEFAULT_* counterparts. iconic separation of vibes. β¨
options WSCOMPAT_USL_SYNCTIMEOUT=nnnβ the virtual screen switching protocol enabled byWSDISPLAY_COMPAT_USLuses a somewhat complex handshake protocol to pass control to user programs such as X servers controlling a virtual screen. in order to prevent a non-responsive application from locking the whole console system, a screen switch will be rolled back after a 5 second timeout if the application does not respond. this option can be used to specify in seconds a different timeout value. β³options WSKBD_EVENT_AUTOREPEATβ if set, this option enables auto repeat even in event mode. the auto repeat will generate key down events while the key is pressed. πoptions WSKBD_USONLYβ in order to strip down the space usage ofwscons, all keymaps except the US english one can be removed from the kernel with this option, which results in a space gain of about 10kB. tiny but mighty. π§
π₯ SEE ALSO π₯
wsdisplay(4)wskbd(4)wsmouse(4)wsmux(4)wsconscfg(8)wsconsctl(8)wsfontload(8)wscons(9)
π and that's the WSCONS(4) page, bestie β source/version and date vibes: Debian, June 5, 2012. byeee π«Ά
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 1999, 2004 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms