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_DISABLE_DDBKEY"
40 .Cd "options SC_DISABLE_REBOOT"
41 .Cd "options SC_HISTORY_SIZE=N"
42 .Cd "options SC_MOUSE_CHAR=C"
43 .Cd "options SC_NO_CUTPASTE"
44 .Cd "options SC_NO_FONT_LOADING"
45 .Cd "options SC_NO_HISTORY"
46 .Cd "options SC_NO_PALETTE_LOADING"
47 .Cd "options SC_NO_SYSMOUSE"
48 .Cd "options SC_PIXEL_MODE"
49 .Cd "options SC_TWOBUTTON_MOUSE
50 .Cd "options SC_NORM_ATTR=_attribute_"
51 .Cd "options SC_NORM_REV_ATTR=_attribute_"
52 .Cd "options SC_KERNEL_CONS_ATTR=_attribute_"
53 .Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_"
54 .Cd "options SC_DFLT_FONT"
55 .Cd "makeoptions SC_DFLT_FONT=_font_name_"
56 .Cd "device sc0 at isa?" Op flags Ar flags
60 driver provides multiple virtual terminals.
61 It resembles the SCO color console driver.
65 driver is implemented on top of the keyboard driver
67 and the video card driver
69 and so requires both of them to be configured in the system.
73 device defined in the system.
77 driver provides multiple virtual terminals which appear as if they were
79 One virtual terminal is considered current and exclusively
80 occupies the screen and the keyboard; the other virtual terminals
81 are placed in the background.
83 In order to use virtual terminals, they must be individually
88 will recognize them to be active and run
90 to let the user to login to the system.
91 By default, only the first eight virtual terminals are activated in
96 key and a switch key to switch between
98 The following table summarizes the correspondence between the switch
99 key and the virtual terminal.
100 .Bd -literal -offset indent
101 Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyv10
102 Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyv11
103 Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyv12
104 Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyv13
105 Alt-F5 ttyv4 Alt-F11 ttyv10 Shift-Alt-F5 ttyv14
106 Alt-F6 ttyv5 Alt-F12 ttyv11 Shift-Alt-F6 ttyv15
109 You can also use the ``nscr'' key (usually the
111 key on the AT Enhanced keyboard) to cycle available virtual terminals.
113 The default number of available virtual terminals is 16.
114 This can be changed by the kernel configuration option
118 Note that the X server usually requires a virtual terminal for display
119 purposes, so at least one terminal must be left unused by
121 so that it can be used by the X server.
122 .Ss Key Definitions and Function Key Strings
125 driver, in conjunction with the keyboard driver, allows the user
126 to change key definitions and function key strings.
129 command will load a key definition file (known as ``keymap'' file),
130 dump the current keymap, and assign a string to a function key.
137 You may want to set the
140 .Pa /etc/rc.conf.local
141 to the desired keymap file so that it will be automatically loaded
142 when the system starts up.
144 For most modern video cards, e.g. VGA, the
146 driver and the video card driver allow the user to change
147 the font used on the screen.
150 command can be used to load a font file from
151 .Pa /usr/share/syscons/fonts .
153 The font comes in various sizes: 8x8, 8x14 and 8x16.
154 The 8x16 font is typically used for the VGA card in the 80-column-
156 Other video modes may require different size of font.
157 It is better to always load these three sizes of the same font.
165 .Pa /etc/rc.conf.local
166 to the desired font files so that they will be automatically loaded
167 when the system starts up.
169 Optionally you can make a particular font file as the default font.
174 If your video card does not support software font, you may still be able
175 to have similar effect by re-mapping font hard-wired in the video card.
178 to load a screen map file which defines mapping between character codes.
179 .Ss Mouse Support and Copy-and-Paste
180 You can use your mouse to copy text on the screen and paste it as if
182 You must be running the mouse daemon
184 and enable the mouse cursor in the virtual terminal via
187 Pressing the mouse button 1 (usually the left button) will start selection.
188 Releasing the button 1 will end the selection process.
189 The selected text will be marked by inverting foreground and
191 You can press the button 3 (usually the right button) to extend
193 The selected text is placed in the copy buffer and can be pasted
194 at the cursor position by your pressing the button 2 (usually the
195 middle button) as many times as you like.
197 If your mouse has only two buttons, you may want to use the
198 .Dv SC_TWOBUTTON_MOUSE
199 option below to make the right button to paste the text.
200 Alternatively you can make the mouse daemon
201 to emulate the middle button.
208 driver allows the user to browse the output which has ``scrolled off''
209 from the top of the screen.
211 Press the ``slock'' key (usually
215 keys on many AT Enhanced keyboards) and the terminal is
216 in the ``back scrolling'' mode.
217 It is indicated by the
224 keys to scroll buffered terminal output.
225 Press the ``slock'' key again to get back to the normal terminal mode.
227 The size of the back-scroll buffer can be set by the
233 driver can be made to put up the screen saver if the current
234 virtual terminal is idle, that is, the user is not typing
235 on the keyboard nor moving mouse.
241 .Sh DRIVER CONFIGURATION
242 .Ss Kernel Configuration Options
243 The following kernel configuration options control the
246 .Bl -tag -width MOUSE
248 This option sets the number of virtual terminals to
250 The default value is 16.
251 .It Dv SC_ALT_MOUSE_IMAGE
252 This option selects the alternative way of displaying the mouse cursor
253 in the virtual terminal.
254 It may be vastly costly for some video cards to draw the arrow-shaped
255 cursor and you may want to try this option.
256 However, the appearance of the alternative mouse cursor may not be
258 Note that if you use the
259 .Dv SC_NO_FONT_LOADING
260 option then you must also use this option if you wish to be able to use
262 .It Dv SC_DISABLE_DDBKEY
263 This option disables the ``debug'' key (by default, it is
266 .Dv Ctl-PrintScreen ) .
267 It will prevent the user from
268 entering the kernel debugger DDB by pressing the key combination.
269 DDB will still be invoked when the kernel panics or hits a break point
270 if it is included in the kernel.
271 .It Dv SC_DISABLE_REBOOT
272 This option disables the ``reboot'' key (by default, it is
274 so that the casual user may not accidentally reboot the system.
275 .It Dv SC_HISTORY_SIZE=N
276 Sets the size of back scroll buffer to
279 The default value is 100.
280 .It Dv SC_MOUSE_CHAR=C
282 .Dv SC_ALT_MOUSE_IMAGE
283 option above is specified, the
286 driver reserves four consecutive character codes in order to display the
287 mouse cursor in the virtual terminals in some systems.
288 This option specifies the first character code to
290 to be used for this purpose.
291 The default value is 0xd0.
292 A good candidate is 0x03.
294 Adds support for pixel (raster) mode console.
295 This mode is useful on some laptop computers, but less so on
296 most other systems, and it adds substantial amount of code to syscons.
297 If the this option is NOT defined, you can reduce the kernel size a lot.
301 .It Dv SC_TWOBUTTON_MOUSE
302 If you have a two button mouse, you may want to add this option
303 to use the right button of the mouse to paste text.
305 .Sx Mouse Support and Copy-and-Paste
307 .It Dv SC_NORM_ATTR=_attribute_
308 .It Dv SC_NORM_REV_ATTR=_attribute_
309 .It Dv SC_KERNEL_CONS_ATTR=_attribute_
310 .It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_
311 These options will set the default colors.
312 Available colors are defined in
313 .Pa /usr/include/machine/pc/display.h .
318 This option will specify the default font.
319 Available fonts are: iso, iso2, koi8-r, cp437, cp850, cp865 and cp866.
320 16-line, 14-line and 8-line font data will be compiled in.
321 Without this option, the
323 driver will use whatever font already loaded in the video card,
324 unless you explicitly load software font at startup.
330 The following options will remove some features from the
332 driver and save kernel memory.
333 .Bl -tag -width MOUSE
334 .It Dv SC_NO_CUTPASTE
335 This option disables ``copy and paste'' operation in virtual
337 .It Dv SC_NO_FONT_LOADING
340 driver can load software font on some video cards.
341 This option removes this feature.
342 Note that if you still wish to use
343 the mouse with this option then you must also use the
344 .Dv SC_ALT_MOUSE_IMAGE
347 This option disables back-scrolling in virtual terminals.
348 .\".It Dv SC_NO_PALETTE_LOADING
349 .It Dv SC_NO_SYSMOUSE
350 This option removes mouse support in the
355 will fail if this option is defined.
356 This option implies the
361 The following driver flags can be used to control the
364 They can be set either in the kernel configuration file
367 or else in the User Configuration Menu at boot
371 .Bl -tag -width bit_0
372 .\".It bit 0 (VISUAL_BELL)
373 .\"Uses the ``visual'' bell.
374 .\"The screen will blink instead of generating audible sound.
375 .\".It bit 1,2 (CURSOR_TYPE)
376 .\"This option specifies the cursor appearance.
377 .\"Possible values are:
378 .\".Bl -tag -width TYPE -compact
380 .\"normal block cursor
382 .\"blinking block cursor
386 .\"blinking underline (aka destructive) cursor
388 .\".It bit 6 (QUIET_BELL)
389 .\"This option suppresses the bell, whether audible or visual,
390 .\"if it is rung in a background virtual terminal.
391 .It 0x0080 (VESA800X600)
392 This option puts the video card in the VESA 800x600 dots, 16 color
394 It may be useful for laptop computers for which the 800x600 mode
395 is otherwise unsupported by the X server.
396 Note that in order for this flag to work, the kernel must be
399 option explained above.
400 .\"Note also that the ``copy-and-paste'' function is not currently supported
401 .\"in this mode and the mouse pointer will not be displayed.
402 .It 0x0100 (AUTODETECT_KBD)
403 This option instructs the syscons driver to periodically scan
404 for a keyboard device if it is not currently attached to one.
405 Otherwise, the driver only probes for a keyboard once during bootup.
408 .Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
410 .It Pa /dev/consolectl
414 terminal initialization information
415 .It Pa /usr/share/syscons/fonts/*
417 .It Pa /usr/share/syscons/keymaps/*
419 .It Pa /usr/share/syscons/scrmaps/*
425 driver requires the keyboard driver and the video card driver,
426 the kernel configuration file should contain the following lines.
428 .Bd -literal -offset indent
429 device atkbdc0 at isa? port IO_KBD
430 device atkbd0 at atkbdc? irq 1
431 device vga0 at isa? conflicts
437 If you do not intend to load the splash image or use the screen saver,
438 the last line is not necessary, and can be omitted.
440 Note that the keyboard controller driver
442 is required by the keyboard driver
445 The following lines will set the default colors.
446 The normal text will be green on black background.
447 The reversed text will be yellow on green background.
448 Note that you cannot put any white space inside the quoted string,
449 because of the current implementation of
452 .Dl "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
453 .Dl "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
455 The following lines will set the default colors of the kernel message.
456 The kernel message will be printed bright red on black background.
457 The reversed message will be black on red background.
459 .Dl "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)
460 .Dl "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)
462 The following example adds the font files
469 .Dl "options SC_DFLT_FONT"
470 .Dl "makeoptions SC_DFLT_FONT=cp850
471 .Dl "device sc0 at isa?
476 This manual page is incomplete and urgently needs revision.
498 driver first appeared in
504 driver was written by
505 .An S\(/oren Schmidt Aq sos@FreeBSD.org .
506 This manual page was written by
507 .An Kazutaka Yokota Aq yokota@FreeBSD.org .