3 .\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer as
11 .\" the first lines of this file unmodified.
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.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .\" $FreeBSD: src/share/man/man4/syscons.4,v 1.10.2.14 2003/04/25 21:21:36 brueffer Exp $
28 .\" $DragonFly: src/share/man/man4/syscons.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
36 .Nd the console driver
38 .Cd "options MAXCONS=N"
39 .Cd "options SC_ALT_MOUSE_IMAGE"
40 .Cd "options SC_DISABLE_DDBKEY"
41 .Cd "options SC_DISABLE_REBOOT"
42 .Cd "options SC_HISTORY_SIZE=N"
43 .Cd "options SC_MOUSE_CHAR=C"
44 .Cd "options SC_NO_CUTPASTE"
45 .Cd "options SC_NO_FONT_LOADING"
46 .Cd "options SC_NO_HISTORY"
47 .Cd "options SC_NO_PALETTE_LOADING"
48 .Cd "options SC_NO_SYSMOUSE"
49 .Cd "options SC_PIXEL_MODE"
50 .Cd "options SC_TWOBUTTON_MOUSE"
51 .Cd "options SC_NORM_ATTR=_attribute_"
52 .Cd "options SC_NORM_REV_ATTR=_attribute_"
53 .Cd "options SC_KERNEL_CONS_ATTR=_attribute_"
54 .Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_"
55 .Cd "options SC_DFLT_FONT"
56 .Cd "makeoptions SC_DFLT_FONT=_font_name_"
57 .Cd "device sc0 at isa?" Op flags Ar flags
61 driver provides multiple virtual terminals.
62 It resembles the SCO color console driver.
66 driver is implemented on top of the keyboard driver
68 and the video card driver
70 and so requires both of them to be configured in the system.
74 device defined in the system.
78 driver provides multiple virtual terminals which appear as if they were
80 One virtual terminal is considered current and exclusively
81 occupies the screen and the keyboard; the other virtual terminals
82 are placed in the background.
84 In order to use virtual terminals, they must be individually
89 will recognize them to be active and run
91 to let the user log in to the system.
92 By default, only the first eight virtual terminals are activated in
97 key and a switch key to switch between
99 The following table summarizes the correspondence between the switch
100 key and the virtual terminal.
101 .Bd -literal -offset indent
102 Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyv10
103 Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyv11
104 Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyv12
105 Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyv13
106 Alt-F5 ttyv4 Alt-F11 ttyv10 Shift-Alt-F5 ttyv14
107 Alt-F6 ttyv5 Alt-F12 ttyv11 Shift-Alt-F6 ttyv15
110 You can also use the ``nscr'' key (usually the
112 key on the AT Enhanced keyboard) to cycle available virtual terminals.
114 The default number of available virtual terminals is 16.
115 This can be changed with the kernel configuration option
119 Note that the X server usually requires a virtual terminal for display
120 purposes, so at least one terminal must be left unused by
122 so that it can be used by the X server.
123 .Ss Key Definitions and Function Key Strings
126 driver, in conjunction with the keyboard driver, allows the user
127 to change key definitions and function key strings.
130 command will load a key definition file (known as ``keymap'' file),
131 dump the current keymap, and assign a string to a function key.
138 You may want to set the
141 .Pa /etc/rc.conf.local
142 to the desired keymap file so that it will be automatically loaded
143 when the system starts up.
145 For most modern video cards, e.g. VGA, the
147 driver and the video card driver allow the user to change
148 the font used on the screen.
151 command can be used to load a font file from
152 .Pa /usr/share/syscons/fonts .
154 The font comes in various sizes: 8x8, 8x14 and 8x16.
155 The 8x16 font is typically used for the VGA card in the
156 80-column-by-25-line mode.
157 Other video modes may require different font sizes.
158 It is better to always load all three sizes of the same font.
167 to the desired font files so that they will be automatically loaded
168 when the system starts up.
170 Optionally you can specify a particular font file as the default.
175 If your video card does not support software fonts, you may still be able
176 to achieve a similar effect by re-mapping the font built into your video card.
179 to load a screen map file which defines the mapping between character codes.
180 .Ss Mouse Support and Copy-and-Paste
181 You can use your mouse to copy text on the screen and paste it as if
182 it was typed by hand.
183 You must be running the mouse daemon
185 and enable the mouse cursor in the virtual terminal via
188 Pressing mouse button 1 (usually the left button) will start selection.
189 Releasing button 1 will end the selection process.
190 The selected text will be marked by inverting foreground and
192 You can press button 3 (usually the right button) to extend
194 The selected text is placed in the copy buffer and can be pasted
195 at the cursor position by pressing button 2 (usually the
196 middle button) as many times as you like.
198 If your mouse has only two buttons, you may want to use the
199 .Dv SC_TWOBUTTON_MOUSE
200 option below to make the right button to paste the text.
201 Alternatively you can make the mouse daemon
202 emulate the middle button.
209 driver allows the user to browse the output which has ``scrolled off''
210 the top of the screen.
212 Press the ``slock'' key (usually
218 on many keyboards) and the terminal is
219 in the ``scrollback'' mode.
220 It is indicated by the
223 Use the arrow keys, the
227 keys to scroll buffered terminal output.
228 Press the ``slock'' key again to get back to the normal terminal mode.
230 The size of the scrollback buffer can be set by the
232 option described below.
236 driver can be made to put up the screen saver if the current
237 virtual terminal is idle, that is, the user is not typing
238 on the keyboard nor moving the mouse.
244 .Sh DRIVER CONFIGURATION
245 .Ss Kernel Configuration Options
246 The following kernel configuration options control the
249 .Bl -tag -width MOUSE
251 This option sets the number of virtual terminals to
253 The default value is 16.
254 .It Dv SC_ALT_MOUSE_IMAGE
255 This option selects the alternative way of displaying the mouse cursor
256 in the virtual terminal.
257 It may be expensive for some video cards to draw the arrow-shaped
258 cursor, and you may want to try this option.
259 However, the appearance of the alternative mouse cursor may not be
261 Note that if you use the
262 .Dv SC_NO_FONT_LOADING
263 option then you must also use this option if you wish to be able to use
265 .It Dv SC_DISABLE_DDBKEY
266 This option disables the ``debug'' key combination (by default, it is
269 .Dv Ctl-PrintScreen ) .
270 It will prevent users from
271 entering the kernel debugger (DDB) by pressing the key combination.
272 DDB will still be invoked when the kernel panics or hits a break point
273 if it is included in the kernel.
274 .It Dv SC_DISABLE_REBOOT
275 This option disables the ``reboot'' key (by default, it is
277 so that the casual user may not accidentally reboot the system.
278 .It Dv SC_HISTORY_SIZE=N
279 Sets the size of back scroll buffer to
282 The default value is 100.
283 .It Dv SC_MOUSE_CHAR=C
285 .Dv SC_ALT_MOUSE_IMAGE
286 option above is specified, the
288 driver reserves four consecutive character codes in order to display the
289 mouse cursor in the virtual terminals in some systems.
290 This option specifies the first character code to
292 to be used for this purpose.
293 The default value is 0xd0.
294 A good candidate is 0x03.
296 Adds support for pixel (raster) mode console.
297 This mode is useful on some laptop computers, but less so on
298 most other systems, and it adds substantial amount of code to syscons.
299 If this option is NOT defined, you can reduce the kernel size a lot.
303 .It Dv SC_TWOBUTTON_MOUSE
304 If you have a two button mouse, you may want to add this option
305 to use the right button of the mouse to paste text.
307 .Sx Mouse Support and Copy-and-Paste
309 .It Dv SC_NORM_ATTR=_attribute_
310 .It Dv SC_NORM_REV_ATTR=_attribute_
311 .It Dv SC_KERNEL_CONS_ATTR=_attribute_
312 .It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_
313 These options will set the default colors.
314 Available colors are defined in
315 .Pa /usr/include/machine/pc/display.h .
320 This option will specify the default font.
321 Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865,
323 16-line, 14-line and 8-line font data will be compiled in.
324 Without this option, the
326 driver will use whatever font is already loaded in the video card,
327 unless you explicitly load a software font at startup.
333 The following options will remove some features from the
335 driver and save kernel memory.
336 .Bl -tag -width MOUSE
337 .It Dv SC_NO_CUTPASTE
338 This option disables ``copy and paste'' operation in virtual
340 .It Dv SC_NO_FONT_LOADING
343 driver can load software fonts on some video cards.
344 This option removes this feature.
345 Note that if you still wish to use
346 the mouse with this option then you must also use the
347 .Dv SC_ALT_MOUSE_IMAGE
350 This option disables back-scrolling in virtual terminals.
351 .\".It Dv SC_NO_PALETTE_LOADING
352 .It Dv SC_NO_SYSMOUSE
353 This option removes mouse support in the
358 will fail if this option is defined.
359 This option implies the
364 The following driver flags can be used to control the
367 They can be set either in the kernel configuration file
370 or else in the User Configuration Menu at boot
374 .Bl -tag -width bit_0
375 .\".It bit 0 (VISUAL_BELL)
376 .\"Uses the ``visual'' bell.
377 .\"The screen will blink instead of generating audible sound.
378 .\".It bit 1,2 (CURSOR_TYPE)
379 .\"This option specifies the cursor appearance.
380 .\"Possible values are:
381 .\".Bl -tag -width TYPE -compact
383 .\"normal block cursor
385 .\"blinking block cursor
389 .\"blinking underline (aka destructive) cursor
391 .\".It bit 6 (QUIET_BELL)
392 .\"This option suppresses the bell, whether audible or visual,
393 .\"if it is rung in a background virtual terminal.
394 .It 0x0080 (VESA800X600)
395 This option puts the video card in the VESA 800x600 pixel, 16 color
397 It may be useful for laptop computers for which the 800x600 mode
398 is otherwise unsupported by the X server.
399 Note that in order for this flag to work, the kernel must be
402 option explained above.
403 .\"Note also that the ``copy-and-paste'' function is not currently supported
404 .\"in this mode and the mouse pointer will not be displayed.
405 .It 0x0100 (AUTODETECT_KBD)
406 This option instructs the syscons driver to periodically scan
407 for a keyboard device if it is not currently attached to one.
408 Otherwise, the driver only probes for a keyboard once during bootup.
411 .Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
413 .It Pa /dev/consolectl
417 terminal initialization information
418 .It Pa /usr/share/syscons/fonts/*
420 .It Pa /usr/share/syscons/keymaps/*
422 .It Pa /usr/share/syscons/scrmaps/*
428 driver requires the keyboard driver and the video card driver,
429 the kernel configuration file should contain the following lines.
431 .Bd -literal -offset indent
432 device atkbdc0 at isa? port IO_KBD
433 device atkbd0 at atkbdc? irq 1
440 If you do not intend to load the splash image or use the screen saver,
441 the last line is not necessary, and can be omitted.
443 Note that the keyboard controller driver
445 is required by the keyboard driver
448 The following lines will set the default colors.
449 The normal text will be green on black background.
450 The reversed text will be yellow on green background.
451 Note that you cannot put any white space inside the quoted string,
452 because of the current implementation of
455 .Dl "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
456 .Dl "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
458 The following lines will set the default colors of the kernel message.
459 The kernel message will be printed bright red on black background.
460 The reversed message will be black on red background.
462 .Dl "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)
463 .Dl "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)
465 The following example adds the font files
472 .Dl "options SC_DFLT_FONT"
473 .Dl "makeoptions SC_DFLT_FONT=cp850
474 .Dl "device sc0 at isa?
478 The Amount of data that is possible to insert from the cut buffer is limited
481 a system limit on the number of bytes that may be stored in the terminal
482 input queue - usually 1024 bytes
486 This manual page is incomplete and urgently needs revision.
508 driver first appeared in
514 driver was written by
515 .An S\(/oren Schmidt Aq sos@FreeBSD.org .
516 This manual page was written by
517 .An Kazutaka Yokota Aq yokota@FreeBSD.org .