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_DFLT_TERM"
42 .Cd "options SC_DISABLE_KDBKEY"
43 .Cd "options SC_DISABLE_REBOOT"
44 .Cd "options SC_HISTORY_SIZE=N"
45 .Cd "options SC_MOUSE_CHAR=C"
46 .Cd "options SC_NO_CUTPASTE"
47 .Cd "options SC_NO_FONT_LOADING"
48 .Cd "options SC_NO_HISTORY"
49 .Cd "options SC_NO_PALETTE_LOADING"
50 .Cd "options SC_NO_SUSPEND_VTYSWITCH"
51 .Cd "options SC_NO_SYSMOUSE"
52 .Cd "options SC_NO_TERM_DUMB"
53 .Cd "options SC_NO_TERM_SC"
54 .Cd "options SC_NO_TERM_SCTEKEN"
55 .Cd "options SC_PIXEL_MODE"
56 .Cd "options SC_TWOBUTTON_MOUSE"
57 .Cd "options SC_NORM_ATTR=_attribute_"
58 .Cd "options SC_NORM_REV_ATTR=_attribute_"
59 .Cd "options SC_KERNEL_CONS_ATTR=_attribute_"
60 .Cd "options SC_KERNEL_CONS_ATTRS=_attributes_"
61 .Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_"
62 .Cd "options SC_DFLT_FONT"
63 .Cd "makeoptions SC_DFLT_FONT=_font_name_"
67 .Pa /boot/device.hints :
68 .Cd hint.sc.0.at="isa"
69 .Cd hint.sc.0.vesa_mode=0x103
72 .Pa /boot/loader.conf :
77 driver provides multiple virtual terminals.
78 It resembles the SCO color console driver.
82 driver is implemented on top of the keyboard driver
84 and the video card driver
86 and so requires both of them to be configured in the system.
90 device defined in the system.
94 driver provides multiple virtual terminals which appear as if they were
96 One virtual terminal is considered current and exclusively
97 occupies the screen and the keyboard; the other virtual terminals
98 are placed in the background.
100 In order to use virtual terminals, they must be individually
105 will recognize them to be active and run
107 to let the user log in to the system.
108 By default, only the first eight virtual terminals are activated in
113 key and a switch key to switch between
115 The following table summarizes the correspondence between the switch
116 key and the virtual terminal.
117 .Bd -literal -offset indent
118 Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyva
119 Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyvb
120 Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyvc
121 Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyvd
122 Alt-F5 ttyv4 Alt-F11 ttyva Shift-Alt-F5 ttyve
123 Alt-F6 ttyv5 Alt-F12 ttyvb Shift-Alt-F6 ttyvf
126 You can also use the ``nscr'' key (usually the
128 key on the AT Enhanced keyboard) to cycle available virtual terminals.
130 The default number of available virtual terminals is 16.
131 This can be changed with the kernel configuration option
135 Note that the X server usually requires a virtual terminal for display
136 purposes, so at least one terminal must be left unused by
138 so that it can be used by the X server.
139 .Ss Key Definitions and Function Key Strings
142 driver, in conjunction with the keyboard driver, allows the user
143 to change key definitions and function key strings.
146 command will load a key definition file (known as ``keymap'' file),
147 dump the current keymap, and assign a string to a function key.
154 You may want to set the
157 .Pa /etc/rc.conf.local
158 to the desired keymap file so that it will be automatically loaded
159 when the system starts up.
161 For most modern video cards, e.g., VGA, the
163 driver and the video card driver allow the user to change
164 the font used on the screen.
167 command can be used to load a font file from
168 .Pa /usr/share/syscons/fonts .
170 The font comes in various sizes: 8x8, 8x14 and 8x16.
171 The 8x16 font is typically used for the VGA card in the
172 80-column-by-25-line mode.
173 Other video modes may require different font sizes.
174 It is better to always load all three sizes of the same font.
183 to the desired font files so that they will be automatically loaded
184 when the system starts up.
186 Optionally you can specify a particular font file as the default.
191 If your video card does not support software fonts, you may still be able
192 to achieve a similar effect by re-mapping the font built into your video card.
195 to load a screen map file which defines the mapping between character codes.
196 .Ss Mouse Support and Copy-and-Paste
197 You can use your mouse to copy text on the screen and paste it as if
198 it was typed by hand.
199 You must be running the mouse daemon
201 and enable the mouse cursor in the virtual terminal via
204 Pressing mouse button 1 (usually the left button) will start selection.
205 Releasing button 1 will end the selection process.
206 The selected text will be marked by inverting foreground and
208 You can press button 3 (usually the right button) to extend
210 The selected text is placed in the copy buffer and can be pasted
211 at the cursor position by pressing button 2 (usually the
212 middle button) as many times as you like.
214 If your mouse has only two buttons, you may want to use the
215 .Dv SC_TWOBUTTON_MOUSE
216 option below to make the right button to paste the text.
217 Alternatively you can make the mouse daemon
218 emulate the middle button.
225 driver allows the user to browse the output which has ``scrolled off''
226 the top of the screen.
228 Press the ``slock'' key (usually
234 on many keyboards) and the terminal is
235 in the ``scrollback'' mode.
236 It is indicated by the
239 Use the arrow keys, the
243 keys to scroll buffered terminal output.
244 Press the ``slock'' key again to get back to the normal terminal mode.
246 The size of the scrollback buffer can be set by the
248 option described below.
252 driver can be made to put up the screen saver if the current
253 virtual terminal is idle, that is, the user is not typing
254 on the keyboard nor moving the mouse.
260 .Sh DRIVER CONFIGURATION
261 .Ss Kernel Configuration Options
262 The following kernel configuration options control the
265 .Bl -tag -width MOUSE
267 This option sets the number of virtual terminals to
269 The default value is 16.
270 .It Dv SC_ALT_MOUSE_IMAGE
271 This option selects the alternative way of displaying the mouse cursor
272 in the virtual terminal.
273 It may be expensive for some video cards to draw the arrow-shaped
274 cursor, and you may want to try this option.
275 However, the appearance of the alternative mouse cursor may not be
277 Note that if you use the
278 .Dv SC_NO_FONT_LOADING
279 option then you must also use this option if you wish to be able to use
281 .It Dv SC_CUT_SEPCHARS=_characters_
282 This options specifies characters that will be looked for when the
283 driver searches for words boundaries when doing cut operation.
284 By default, its value is
286 \(em a space character.
287 .It Dv SC_CUT_SPACES2TABS
288 This options instructs the driver to convert leading spaces into tabs
289 when copying data into cut buffer.
290 This might be useful to preserve
291 indentation when copying tab-indented text.
292 .It Dv SC_DFLT_TERM=_name_
293 This option specifies the name of the preferred terminal emulator.
294 .It Dv SC_DISABLE_KDBKEY
295 This option disables the ``debug'' key combination (by default, it is
298 .Dv Ctl-PrintScreen ) .
299 It will prevent users from
300 entering the kernel debugger (KDB) by pressing the key combination.
301 KDB will still be invoked when the kernel panics or hits a break point
302 if it is included in the kernel.
303 If this option is not defined, this behavior may be controlled at runtime
307 .Va hw.syscons.kbd_debug .
308 .It Dv SC_DISABLE_REBOOT
309 This option disables the ``reboot'' key (by default, it is
311 so that the casual user may not accidentally reboot the system.
312 If this option is not defined, this behavior may be controlled at runtime
316 .Va hw.syscons.kbd_reboot .
317 .It Dv SC_HISTORY_SIZE=N
318 Sets the size of back scroll buffer to
321 The default value is 100.
322 .It Dv SC_MOUSE_CHAR=C
324 .Dv SC_ALT_MOUSE_IMAGE
325 option above is specified, the
327 driver reserves four consecutive character codes in order to display the
328 mouse cursor in the virtual terminals in some systems.
329 This option specifies the first character code to
331 to be used for this purpose.
332 The default value is 0xd0.
333 A good candidate is 0x03.
335 Adds support for pixel (raster) mode console.
336 This mode is useful on some laptop computers, but less so on
337 most other systems, and it adds substantial amount of code to syscons.
338 If this option is NOT defined, you can reduce the kernel size a lot.
342 .It Dv SC_TWOBUTTON_MOUSE
343 If you have a two button mouse, you may want to add this option
344 to use the right button of the mouse to paste text.
346 .Sx Mouse Support and Copy-and-Paste
348 .It Dv SC_NORM_ATTR=_attribute_
349 .It Dv SC_NORM_REV_ATTR=_attribute_
350 .It Dv SC_KERNEL_CONS_ATTR=_attribute_
351 .It Dv SC_KERNEL_CONS_ATTRS=_attributes_
352 .It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_
353 These options will set the default colors.
354 Available colors are defined in
355 .In machine/pc/display.h .
359 .Dv SC_KERNEL_CONS_ATTRS
360 is a character string giving a sequence of attributes in binary format.
361 The sequence will be repeated up to the number of CPUs.
362 Beware that the string must not be null,
363 since the kernel divides by its length.
365 This option will specify the default font.
366 Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865,
368 16-line, 14-line and 8-line font data will be compiled in.
369 Without this option, the
371 driver will use whatever font is already loaded in the video card,
372 unless you explicitly load a software font at startup.
376 .It Dv SC_NO_SUSPEND_VTYSWITCH
377 This option, which is also available as
382 .Va hw.syscons.sc_no_suspend_vtswitch ,
383 disables switching between virtual terminals (graphics <-> text) during
384 suspend/resume (ACPI and APM).
385 Use this option if your system is freezing
386 when you are running X and trying to suspend.
389 The following options will remove some features from the
391 driver and save kernel memory.
392 .Bl -tag -width MOUSE
393 .It Dv SC_NO_CUTPASTE
394 This option disables ``copy and paste'' operation in virtual
396 .It Dv SC_NO_FONT_LOADING
399 driver can load software fonts on some video cards.
400 This option removes this feature.
401 Note that if you still wish to use
402 the mouse with this option then you must also use the
403 .Dv SC_ALT_MOUSE_IMAGE
406 This option disables back-scrolling in virtual terminals.
407 .\".It Dv SC_NO_PALETTE_LOADING
408 .It Dv SC_NO_SYSMOUSE
409 This option removes mouse support in the
414 will fail if this option is defined.
415 This option implies the
418 .It Dv SC_NO_TERM_DUMB
420 .It Dv SC_NO_TERM_SCTEKEN
421 These options remove the
426 terminal emulators, respectively.
429 The following driver flags can be used to control the
432 Driver flags can be set with the
435 .Pa /boot/device.hints ,
436 or else at the loader prompt (see
438 .Bl -tag -width bit_0
439 .\".It bit 0 (VISUAL_BELL)
440 .\"Uses the ``visual'' bell.
441 .\"The screen will blink instead of generating audible sound.
442 .\".It bit 1,2 (CURSOR_TYPE)
443 .\"This option specifies the cursor appearance.
444 .\"Possible values are:
445 .\".Bl -tag -width TYPE -compact
447 .\"normal block cursor
449 .\"blinking block cursor
453 .\"blinking underline (aka destructive) cursor
455 .\".It bit 6 (QUIET_BELL)
456 .\"This option suppresses the bell, whether audible or visual,
457 .\"if it is rung in a background virtual terminal.
458 .It 0x0080 (VESAMODE)
459 This option puts the video card in the VESA mode specified by
460 .Pa /boot/device.hints
463 during kernel initialization.
464 Note that in order for this flag to work, the kernel must be
467 option explained above.
468 A list of the available mode can be obtained via
470 .\"Note also that the ``copy-and-paste'' function is not currently supported
471 .\"in this mode and the mouse pointer will not be displayed.
472 .It 0x0100 (AUTODETECT_KBD)
473 This option instructs the syscons driver to periodically scan
474 for a keyboard device if it is not currently attached to one.
475 Otherwise, the driver only probes for a keyboard once during bootup.
478 These settings can be entered at the
482 .Bl -tag -width indent
488 have been compiled into the kernel, the one to use for the system console can
489 be selected by setting this variable to
497 when this value is not set.
500 .Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
502 .It Pa /dev/consolectl
506 terminal initialization information
507 .It Pa /usr/share/syscons/fonts/*
509 .It Pa /usr/share/syscons/keymaps/*
511 .It Pa /usr/share/syscons/scrmaps/*
517 driver requires the keyboard driver and the video card driver,
518 the kernel configuration file should contain the following lines.
519 .Bd -literal -offset indent
527 You also need the following lines in
528 .Pa /boot/device.hints
530 .Bd -literal -offset indent
531 hint.atkbdc.0.at="isa"
532 hint.atkbdc.0.port="0x060"
533 hint.atkbd.0.at="atkbdc"
539 If you do not intend to load the splash image or use the screen saver,
540 the last line is not necessary, and can be omitted.
542 Note that the keyboard controller driver
544 is required by the keyboard driver
547 The following lines will set the default colors.
548 The normal text will be green on black background.
549 The reversed text will be yellow on green background.
550 Note that you cannot put any white space inside the quoted string,
551 because of the current implementation of
554 .Dl "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)"
555 .Dl "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)"
557 The following lines will set the default colors of the kernel message.
558 The kernel message will be printed bright red on black background.
559 The reversed message will be black on red background.
561 .Dl "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)"
562 .Dl "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)"
565 .Dv SC_KERNEL_CONS_ATTR
566 is not set, or is set to its default of bright white on black,
567 the following line will set 4 red-ish colors
568 for printing kernel messages in colors depending on the CPU.
570 .Dl options SC_KERNEL_CONS_ATTRS=\e"\ex0c\ex04\ex40\ex0e\e"
572 The default scheme is probably better for up to 8 CPUs.
573 Use a long string to get unique colors for more than 8 CPUs.
575 To turn off all per-CPU coloring of kernel messages,
576 set SC_KERNEL_CONS_ATTR to a non-default value,
577 or use the default in a pattern of length 1.
579 .Dl options SC_KERNEL_CONS_ATTRS=\e"\ex0f\e"
581 The following example adds the font files
588 .Dl "options SC_DFLT_FONT"
589 .Dl "makeoptions SC_DFLT_FONT=cp850"
614 driver first appeared in
620 driver was written by
621 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org .
622 This manual page was written by
623 .An Kazutaka Yokota Aq Mt yokota@FreeBSD.org .
625 The amount of data that is possible to insert from the cut buffer is limited
628 a system limit on the number of bytes that may be stored in the terminal
629 input queue - usually 1024 bytes
633 This manual page is incomplete and urgently needs revision.