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.
35 .Nd the console driver
37 .Cd "options MAXCONS=N"
38 .Cd "options SC_ALT_MOUSE_IMAGE"
39 .Cd "options SC_CUT_SEPCHARS=_characters_"
40 .Cd "options SC_CUT_SPACES2TABS"
41 .Cd "options SC_DISABLE_KDBKEY"
42 .Cd "options SC_DISABLE_REBOOT"
43 .Cd "options SC_HISTORY_SIZE=N"
44 .Cd "options SC_MOUSE_CHAR=C"
45 .Cd "options SC_NO_CUTPASTE"
46 .Cd "options SC_NO_FONT_LOADING"
47 .Cd "options SC_NO_HISTORY"
48 .Cd "options SC_NO_PALETTE_LOADING"
49 .Cd "options SC_NO_SUSPEND_VTYSWITCH"
50 .Cd "options SC_NO_SYSMOUSE"
51 .Cd "options SC_PIXEL_MODE"
52 .Cd "options SC_TWOBUTTON_MOUSE"
53 .Cd "options SC_NORM_ATTR=_attribute_"
54 .Cd "options SC_NORM_REV_ATTR=_attribute_"
55 .Cd "options SC_KERNEL_CONS_ATTR=_attribute_"
56 .Cd "options SC_KERNEL_CONS_ATTRS=_attributes_"
57 .Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_"
58 .Cd "options SC_DFLT_FONT"
59 .Cd "makeoptions SC_DFLT_FONT=_font_name_"
63 .Pa /boot/device.hints :
64 .Cd hint.sc.0.at="isa"
65 .Cd hint.sc.0.vesa_mode=0x103
68 .Pa /boot/loader.conf :
73 driver provides multiple virtual terminals.
74 It resembles the SCO color console driver.
78 driver is implemented on top of the keyboard driver
80 and the video card driver
82 and so requires both of them to be configured in the system.
86 device defined in the system.
90 driver provides multiple virtual terminals which appear as if they were
92 One virtual terminal is considered current and exclusively
93 occupies the screen and the keyboard; the other virtual terminals
94 are placed in the background.
96 In order to use virtual terminals, they must be individually
101 will recognize them to be active and run
103 to let the user log in to the system.
104 By default, only the first eight virtual terminals are activated in
109 key and a switch key to switch between
111 The following table summarizes the correspondence between the switch
112 key and the virtual terminal.
113 .Bd -literal -offset indent
114 Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyva
115 Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyvb
116 Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyvc
117 Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyvd
118 Alt-F5 ttyv4 Alt-F11 ttyva Shift-Alt-F5 ttyve
119 Alt-F6 ttyv5 Alt-F12 ttyvb Shift-Alt-F6 ttyvf
122 You can also use the ``nscr'' key (usually the
124 key on the AT Enhanced keyboard) to cycle available virtual terminals.
126 The default number of available virtual terminals is 16.
127 This can be changed with the kernel configuration option
131 Note that the X server usually requires a virtual terminal for display
132 purposes, so at least one terminal must be left unused by
134 so that it can be used by the X server.
135 .Ss Key Definitions and Function Key Strings
138 driver, in conjunction with the keyboard driver, allows the user
139 to change key definitions and function key strings.
142 command will load a key definition file (known as ``keymap'' file),
143 dump the current keymap, and assign a string to a function key.
150 You may want to set the
153 .Pa /etc/rc.conf.local
154 to the desired keymap file so that it will be automatically loaded
155 when the system starts up.
157 For most modern video cards, e.g., VGA, the
159 driver and the video card driver allow the user to change
160 the font used on the screen.
163 command can be used to load a font file from
164 .Pa /usr/share/syscons/fonts .
166 The font comes in various sizes: 8x8, 8x14 and 8x16.
167 The 8x16 font is typically used for the VGA card in the
168 80-column-by-25-line mode.
169 Other video modes may require different font sizes.
170 It is better to always load all three sizes of the same font.
179 to the desired font files so that they will be automatically loaded
180 when the system starts up.
182 Optionally you can specify a particular font file as the default.
187 If your video card does not support software fonts, you may still be able
188 to achieve a similar effect by re-mapping the font built into your video card.
191 to load a screen map file which defines the mapping between character codes.
192 .Ss Mouse Support and Copy-and-Paste
193 You can use your mouse to copy text on the screen and paste it as if
194 it was typed by hand.
195 You must be running the mouse daemon
197 and enable the mouse cursor in the virtual terminal via
200 Pressing mouse button 1 (usually the left button) will start selection.
201 Releasing button 1 will end the selection process.
202 The selected text will be marked by inverting foreground and
204 You can press button 3 (usually the right button) to extend
206 The selected text is placed in the copy buffer and can be pasted
207 at the cursor position by pressing button 2 (usually the
208 middle button) as many times as you like.
210 If your mouse has only two buttons, you may want to use the
211 .Dv SC_TWOBUTTON_MOUSE
212 option below to make the right button to paste the text.
213 Alternatively you can make the mouse daemon
214 emulate the middle button.
221 driver allows the user to browse the output which has ``scrolled off''
222 the top of the screen.
224 Press the ``slock'' key (usually
230 on many keyboards) and the terminal is
231 in the ``scrollback'' mode.
232 It is indicated by the
235 Use the arrow keys, the
239 keys to scroll buffered terminal output.
240 Press the ``slock'' key again to get back to the normal terminal mode.
242 The size of the scrollback buffer can be set by the
244 option described below.
248 driver can be made to put up the screen saver if the current
249 virtual terminal is idle, that is, the user is not typing
250 on the keyboard nor moving the mouse.
256 .Sh DRIVER CONFIGURATION
257 .Ss Kernel Configuration Options
258 The following kernel configuration options control the
261 .Bl -tag -width MOUSE
263 This option sets the number of virtual terminals to
265 The default value is 16.
266 .It Dv SC_ALT_MOUSE_IMAGE
267 This option selects the alternative way of displaying the mouse cursor
268 in the virtual terminal.
269 It may be expensive for some video cards to draw the arrow-shaped
270 cursor, and you may want to try this option.
271 However, the appearance of the alternative mouse cursor may not be
273 Note that if you use the
274 .Dv SC_NO_FONT_LOADING
275 option then you must also use this option if you wish to be able to use
277 .It Dv SC_CUT_SEPCHARS=_characters_
278 This options specifies characters that will be looked for when the
279 driver searches for words boundaries when doing cut operation.
280 By default, its value is
282 \(em a space character.
283 .It Dv SC_CUT_SPACES2TABS
284 This options instructs the driver to convert leading spaces into tabs
285 when copying data into cut buffer.
286 This might be useful to preserve
287 indentation when copying tab-indented text.
288 .It Dv SC_DISABLE_KDBKEY
289 This option disables the ``debug'' key combination (by default, it is
292 .Dv Ctl-PrintScreen ) .
293 It will prevent users from
294 entering the kernel debugger (KDB) by pressing the key combination.
295 KDB will still be invoked when the kernel panics or hits a break point
296 if it is included in the kernel.
297 If this option is not defined, this behavior may be controlled at runtime
301 .Va hw.syscons.kbd_debug .
302 .It Dv SC_DISABLE_REBOOT
303 This option disables the ``reboot'' key (by default, it is
305 so that the casual user may not accidentally reboot the system.
306 If this option is not defined, this behavior may be controlled at runtime
310 .Va hw.syscons.kbd_reboot .
311 .It Dv SC_HISTORY_SIZE=N
312 Sets the size of back scroll buffer to
315 The default value is 100.
316 .It Dv SC_MOUSE_CHAR=C
318 .Dv SC_ALT_MOUSE_IMAGE
319 option above is specified, the
321 driver reserves four consecutive character codes in order to display the
322 mouse cursor in the virtual terminals in some systems.
323 This option specifies the first character code to
325 to be used for this purpose.
326 The default value is 0xd0.
327 A good candidate is 0x03.
329 Adds support for pixel (raster) mode console.
330 This mode is useful on some laptop computers, but less so on
331 most other systems, and it adds substantial amount of code to syscons.
332 If this option is NOT defined, you can reduce the kernel size a lot.
336 .It Dv SC_TWOBUTTON_MOUSE
337 If you have a two button mouse, you may want to add this option
338 to use the right button of the mouse to paste text.
340 .Sx Mouse Support and Copy-and-Paste
342 .It Dv SC_NORM_ATTR=_attribute_
343 .It Dv SC_NORM_REV_ATTR=_attribute_
344 .It Dv SC_KERNEL_CONS_ATTR=_attribute_
345 .It Dv SC_KERNEL_CONS_ATTRS=_attributes_
346 .It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_
347 These options will set the default colors.
348 Available colors are defined in
349 .In machine/pc/display.h .
353 .Dv SC_KERNEL_CONS_ATTRS
354 is a character string giving a sequence of attributes in binary format.
355 The sequence will be repeated up to the number of CPUs.
356 Beware that the string must not be null,
357 since the kernel divides by its length.
359 This option will specify the default font.
360 Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865,
362 16-line, 14-line and 8-line font data will be compiled in.
363 Without this option, the
365 driver will use whatever font is already loaded in the video card,
366 unless you explicitly load a software font at startup.
370 .It Dv SC_NO_SUSPEND_VTYSWITCH
371 This option, which is also available as
376 .Va hw.syscons.sc_no_suspend_vtswitch ,
377 disables switching between virtual terminals (graphics <-> text) during
378 suspend/resume (ACPI and APM).
379 Use this option if your system is freezing
380 when you are running X and trying to suspend.
383 The following options will remove some features from the
385 driver and save kernel memory.
386 .Bl -tag -width MOUSE
387 .It Dv SC_NO_CUTPASTE
388 This option disables ``copy and paste'' operation in virtual
390 .It Dv SC_NO_FONT_LOADING
393 driver can load software fonts on some video cards.
394 This option removes this feature.
395 Note that if you still wish to use
396 the mouse with this option then you must also use the
397 .Dv SC_ALT_MOUSE_IMAGE
400 This option disables back-scrolling in virtual terminals.
401 .\".It Dv SC_NO_PALETTE_LOADING
402 .It Dv SC_NO_SYSMOUSE
403 This option removes mouse support in the
408 will fail if this option is defined.
409 This option implies the
414 The following driver flags can be used to control the
417 Driver flags can be set with the
420 .Pa /boot/device.hints ,
421 or else at the loader prompt (see
423 .Bl -tag -width bit_0
424 .\".It bit 0 (VISUAL_BELL)
425 .\"Uses the ``visual'' bell.
426 .\"The screen will blink instead of generating audible sound.
427 .\".It bit 1,2 (CURSOR_TYPE)
428 .\"This option specifies the cursor appearance.
429 .\"Possible values are:
430 .\".Bl -tag -width TYPE -compact
432 .\"normal block cursor
434 .\"blinking block cursor
438 .\"blinking underline (aka destructive) cursor
440 .\".It bit 6 (QUIET_BELL)
441 .\"This option suppresses the bell, whether audible or visual,
442 .\"if it is rung in a background virtual terminal.
443 .It 0x0080 (VESAMODE)
444 This option puts the video card in the VESA mode specified by
445 .Pa /boot/device.hints
448 during kernel initialization.
449 Note that in order for this flag to work, the kernel must be
452 option explained above.
453 A list of the available mode can be obtained via
455 .\"Note also that the ``copy-and-paste'' function is not currently supported
456 .\"in this mode and the mouse pointer will not be displayed.
457 .It 0x0100 (AUTODETECT_KBD)
458 This option instructs the syscons driver to periodically scan
459 for a keyboard device if it is not currently attached to one.
460 Otherwise, the driver only probes for a keyboard once during bootup.
463 These settings can be entered at the
467 .Bl -tag -width indent
473 have been compiled into the kernel, the one to use for the system console can
474 be selected by setting this variable to
482 when this value is not set.
485 .Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
487 .It Pa /dev/consolectl
491 terminal initialization information
492 .It Pa /usr/share/syscons/fonts/*
494 .It Pa /usr/share/syscons/keymaps/*
496 .It Pa /usr/share/syscons/scrmaps/*
502 driver requires the keyboard driver and the video card driver,
503 the kernel configuration file should contain the following lines.
504 .Bd -literal -offset indent
512 You also need the following lines in
513 .Pa /boot/device.hints
515 .Bd -literal -offset indent
516 hint.atkbdc.0.at="isa"
517 hint.atkbdc.0.port="0x060"
518 hint.atkbd.0.at="atkbdc"
524 If you do not intend to load the splash image or use the screen saver,
525 the last line is not necessary, and can be omitted.
527 Note that the keyboard controller driver
529 is required by the keyboard driver
532 The following lines will set the default colors.
533 The normal text will be green on black background.
534 The reversed text will be yellow on green background.
535 Note that you cannot put any white space inside the quoted string,
536 because of the current implementation of
539 .Dl "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)"
540 .Dl "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)"
542 The following lines will set the default colors of the kernel message.
543 The kernel message will be printed bright red on black background.
544 The reversed message will be black on red background.
546 .Dl "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)"
547 .Dl "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)"
550 .Dv SC_KERNEL_CONS_ATTR
551 is not set, or is set to its default of bright white on black,
552 the following line will set 4 red-ish colors
553 for printing kernel messages in colors depending on the CPU.
555 .Dl options SC_KERNEL_CONS_ATTRS=\e"\ex0c\ex04\ex40\ex0e\e"
557 The default scheme is probably better for up to 8 CPUs.
558 Use a long string to get unique colors for more than 8 CPUs.
560 To turn off all per-CPU coloring of kernel messages,
561 set SC_KERNEL_CONS_ATTR to a non-default value,
562 or use the default in a pattern of length 1.
564 .Dl options SC_KERNEL_CONS_ATTRS=\e"\ex0f\e"
566 The following example adds the font files
573 .Dl "options SC_DFLT_FONT"
574 .Dl "makeoptions SC_DFLT_FONT=cp850"
599 driver first appeared in
605 driver was written by
606 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org .
607 This manual page was written by
608 .An Kazutaka Yokota Aq Mt yokota@FreeBSD.org .
610 The amount of data that is possible to insert from the cut buffer is limited
613 a system limit on the number of bytes that may be stored in the terminal
614 input queue - usually 1024 bytes
618 This manual page is incomplete and urgently needs revision.