xref: /dragonfly/share/man/man4/syscons.4 (revision dadd6466)
1.\"
2.\" Copyright (c) 1999
3.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
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.
15.\"
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.
26.\"
27.\" $FreeBSD: src/share/man/man4/syscons.4,v 1.10.2.14 2003/04/25 21:21:36 brueffer Exp $
28.\"
29.Dd August 19, 2007
30.Dt SYSCONS 4
31.Os
32.Sh NAME
33.Nm syscons ,
34.Nm sc
35.Nd the console driver
36.Sh SYNOPSIS
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
57.Sh DESCRIPTION
58The
59.Nm
60driver provides multiple virtual terminals.
61It resembles the SCO color console driver.
62.Pp
63The
64.Nm
65driver is implemented on top of the keyboard driver
66.Pq Xr atkbd 4
67and the video card driver
68.Pq Xr vga 4
69and so requires both of them to be configured in the system.
70.Pp
71There can be only one
72.Nm
73device defined in the system.
74.Ss Virtual Terminals
75The
76.Nm
77driver provides multiple virtual terminals which appear as if they were
78separate terminals.
79One virtual terminal is considered current and exclusively
80occupies the screen and the keyboard; the other virtual terminals
81are placed in the background.
82.Pp
83In order to use virtual terminals, they must be individually
84marked ``on'' in
85.Pa /etc/ttys
86so that
87.Xr getty 8
88will recognize them to be active and run
89.Xr login 1
90to let the user log in to the system.
91By default, only the first eight virtual terminals are activated in
92.Pa /etc/ttys .
93.Pp
94You press the
95.Dv Alt
96key and a switch key to switch between
97virtual terminals.
98The following table summarizes the correspondence between the switch
99key and the virtual terminal.
100.Bd -literal -offset indent
101Alt-F1   ttyv0      Alt-F7   ttyv6      Shift-Alt-F1   ttyv10
102Alt-F2   ttyv1      Alt-F8   ttyv7      Shift-Alt-F2   ttyv11
103Alt-F3   ttyv2      Alt-F9   ttyv8      Shift-Alt-F3   ttyv12
104Alt-F4   ttyv3      Alt-F10  ttyv9      Shift-Alt-F4   ttyv13
105Alt-F5   ttyv4      Alt-F11  ttyv10     Shift-Alt-F5   ttyv14
106Alt-F6   ttyv5      Alt-F12  ttyv11     Shift-Alt-F6   ttyv15
107.Ed
108.Pp
109You can also use the ``nscr'' key (usually the
110.Dv PrintScreen
111key on the AT Enhanced keyboard) to cycle available virtual terminals.
112.Pp
113The default number of available virtual terminals is 16.
114This can be changed with the kernel configuration option
115.Dv MAXCONS
116(see below).
117.Pp
118Note that the X server usually requires a virtual terminal for display
119purposes, so at least one terminal must be left unused by
120.Xr getty 8
121so that it can be used by the X server.
122.Ss Key Definitions and Function Key Strings
123The
124.Nm
125driver, in conjunction with the keyboard driver, allows the user
126to change key definitions and function key strings.
127The
128.Xr kbdcontrol 1
129command will load a key definition file (known as ``keymap'' file),
130dump the current keymap, and assign a string to a function key.
131See
132.Xr keyboard 4
133and
134.Xr kbdmap 5
135for the keymap file.
136.Pp
137You may want to set the
138.Ar keymap
139variable in
140.Pa /etc/rc.conf.local
141to the desired keymap file so that it will be automatically loaded
142when the system starts up.
143.Ss Software Font
144For most modern video cards, e.g. VGA, the
145.Nm
146driver and the video card driver allow the user to change
147the font used on the screen.
148The
149.Xr vidcontrol 1
150command can be used to load a font file from
151.Pa /usr/share/syscons/fonts .
152.Pp
153The font comes in various sizes: 8x8, 8x14 and 8x16.
154The 8x16 font is typically used for the VGA card in the
15580-column-by-25-line mode.
156Other video modes may require different font sizes.
157It is better to always load all three sizes of the same font.
158.Pp
159You may set
160.Ar font8x8 ,
161.Ar font8x14
162and
163.Ar font8x16
164variables in
165.Pa /etc/rc.conf
166to the desired font files so that they will be automatically loaded
167when the system starts up.
168.Pp
169Optionally you can specify a particular font file as the default.
170See the
171.Dv SC_DFLT_FONT
172option below.
173.Ss Screen Map
174If your video card does not support software fonts, you may still be able
175to achieve a similar effect by re-mapping the font built into your video card.
176Use
177.Xr vidcontrol 1
178to load a screen map file which defines the mapping between character codes.
179.Ss Mouse Support and Copy-and-Paste
180You can use your mouse to copy text on the screen and paste it as if
181it was typed by hand.
182You must be running the mouse daemon
183.Xr moused 8
184and enable the mouse cursor in the virtual terminal via
185.Xr vidcontrol 1 .
186.Pp
187Pressing mouse button 1 (usually the left button) will start selection.
188Releasing button 1 will end the selection process.
189The selected text will be marked by inverting foreground and
190background colors.
191You can press button 3 (usually the right button) to extend
192the selected region.
193The selected text is placed in the copy buffer and can be pasted
194at the cursor position by pressing button 2 (usually the
195middle button) as many times as you like.
196.Pp
197If your mouse has only two buttons, you may want to use the
198.Dv SC_TWOBUTTON_MOUSE
199option below to make the right button to paste the text.
200Alternatively you can make the mouse daemon
201emulate the middle button.
202See the man page for
203.Xr moused 8
204for more details.
205.Ss Back Scrolling
206The
207.Nm
208driver allows the user to browse the output which has ``scrolled off''
209the top of the screen.
210.Pp
211Press the ``slock'' key (usually
212.Dv ScrllLock
213/
214.Dv Scroll Lock
215or
216.Dv Pause
217on many keyboards) and the terminal is
218in the ``scrollback'' mode.
219It is indicated by the
220.Dv Scroll Lock
221LED.
222Use the arrow keys, the
223.Dv Page Up/Down
224keys and the
225.Dv Home/End
226keys to scroll buffered terminal output.
227Press the ``slock'' key again to get back to the normal terminal mode.
228.Pp
229The size of the scrollback buffer can be set by the
230.Dv SC_HISTORY_SIZE
231option described below.
232.Ss Screen Saver
233The
234.Nm
235driver can be made to put up the screen saver if the current
236virtual terminal is idle, that is, the user is not typing
237on the keyboard nor moving the mouse.
238See
239.Xr splash 4
240and
241.Xr vidcontrol 1
242for more details.
243.Sh DRIVER CONFIGURATION
244.Ss Kernel Configuration Options
245The following kernel configuration options control the
246.Nm
247driver.
248.Bl -tag -width MOUSE
249.It Dv MAXCONS=N
250This option sets the number of virtual terminals to
251.Fa N .
252The default value is 16.
253.It Dv SC_ALT_MOUSE_IMAGE
254This option selects the alternative way of displaying the mouse cursor
255in the virtual terminal.
256It may be expensive for some video cards to draw the arrow-shaped
257cursor, and you may want to try this option.
258However, the appearance of the alternative mouse cursor may not be
259very appealing.
260Note that if you use the
261.Dv SC_NO_FONT_LOADING
262option then you must also use this option if you wish to be able to use
263the mouse.
264.It Dv SC_DISABLE_DDBKEY
265This option disables the ``debug'' key combination (by default, it is
266.Dv Alt-Esc ,
267or
268.Dv Ctl-PrintScreen ) .
269It will prevent users from
270entering the kernel debugger (DDB) by pressing the key combination.
271DDB will still be invoked when the kernel panics or hits a break point
272if it is included in the kernel.
273.It Dv SC_DISABLE_REBOOT
274This option disables the ``reboot'' key (by default, it is
275.Dv Ctl-Alt-Del ) ,
276so that the casual user may not accidentally reboot the system.
277.It Dv SC_HISTORY_SIZE=N
278Sets the size of back scroll buffer to
279.Fa N
280lines.
281The default value is 100.
282.It Dv SC_MOUSE_CHAR=C
283Unless the
284.Dv SC_ALT_MOUSE_IMAGE
285option above is specified, the
286.Nm
287driver reserves four consecutive character codes in order to display the
288mouse cursor in the virtual terminals in some systems.
289This option specifies the first character code to
290.Fa C
291to be used for this purpose.
292The default value is 0xd0.
293A good candidate is 0x03.
294.It Dv SC_PIXEL_MODE
295Adds support for pixel (raster) mode console.
296This mode is useful on some laptop computers, but less so on
297most other systems, and it adds substantial amount of code to
298.Nm .
299If this option is NOT defined, you can reduce the kernel size a lot.
300See the
301.Dv VESA800X600
302flag below.
303.It Dv SC_TWOBUTTON_MOUSE
304If you have a two button mouse, you may want to add this option
305to use the right button of the mouse to paste text.
306See
307.Sx Mouse Support and Copy-and-Paste
308above.
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_
313These options will set the default colors.
314Available colors are defined in
315.In machine/pc/display.h .
316See
317.Sx EXAMPLES
318below.
319.It Dv SC_DFLT_FONT
320This option will specify the default font.
321Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865,
322cp866 and cp866u.
32316-line, 14-line and 8-line font data will be compiled in.
324Without this option, the
325.Nm
326driver will use whatever font is already loaded in the video card,
327unless you explicitly load a software font at startup.
328See
329.Sx EXAMPLES
330below.
331.El
332.Pp
333The following options will remove some features from the
334.Nm
335driver and save kernel memory.
336.Bl -tag -width MOUSE
337.It Dv SC_NO_CUTPASTE
338This option disables ``copy and paste'' operation in virtual
339terminals.
340.It Dv SC_NO_FONT_LOADING
341The
342.Nm
343driver can load software fonts on some video cards.
344This option removes this feature.
345Note that if you still wish to use
346the mouse with this option then you must also use the
347.Dv SC_ALT_MOUSE_IMAGE
348option.
349.It Dv SC_NO_HISTORY
350This option disables back-scrolling in virtual terminals.
351.\".It Dv SC_NO_PALETTE_LOADING
352.It Dv SC_NO_SYSMOUSE
353This option removes mouse support in the
354.Nm
355driver.
356The mouse daemon
357.Xr moused 8
358will fail if this option is defined.
359This option implies the
360.Dv SC_NO_CUTPASTE
361option too.
362.El
363.Ss Driver Flags
364The following driver flags can be used to control the
365.Nm
366driver.
367They can be set either in the kernel configuration file
368(see
369.Xr config 8 ) ,
370or else in the User Configuration Menu at boot
371time
372(see
373.Xr boot 8 ) .
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
382.\".It Dv 0
383.\"normal block cursor
384.\".It Dv 2
385.\"blinking block cursor
386.\".It Dv 4
387.\"underline cursor
388.\".It Dv 6
389.\"blinking underline (aka destructive) cursor
390.\".El
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)
395This option puts the video card in the VESA 800x600 pixel, 16 color
396mode.
397It may be useful for laptop computers for which the 800x600 mode
398is otherwise unsupported by the X server.
399Note that in order for this flag to work, the kernel must be
400compiled with the
401.Dv SC_PIXEL_MODE
402option 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)
406This option instructs the
407.Nm
408driver to periodically scan
409for a keyboard device if it is not currently attached to one.
410Otherwise, the driver only probes for a keyboard once during bootup.
411.El
412.Sh IOCTLS
413The following
414.Xr ioctl 2
415commands are defined for the
416.Nm
417driver in
418.In sys/consio.h .
419.Pp
420.Bl -tag -width CONS -compact
421.It Dv KDGETMODE Ar int *mode
422.It Dv KDSETMODE Ar int *mode
423Get or set the mode of the current (virtual) console. The
424.Dv mode
425can be one of:
426.Pp
427.Bl -tag -width KD_GRAPHICS -compact
428.It Dv KD_TEXT
429same as
430.Dv KD_TEXT0
431.It Dv KD_TEXT0
432Text mode, restore fonts and palette
433.It Dv KD_GRAPHICS
434Graphics mode
435.It Dv KD_TEXT1
436Text mode, don't restore fonts and palette
437.It Dv KD_PIXEL
438Raster (pixel) text mode
439.El
440.Pp
441.It Dv KDSBORDER Ar int *color
442Set the border color of the current (virtual) console.
443.Pp
444.It Dv KDRASTER Ar scr_size_t *sizes
445Set raster (pixel) text mode and adjust the current (virtual) console's
446geometry and font size. The
447.Vt scr_size_t
448argument structure is as follows:
449.Bd -literal
450struct _scr_size {
451	int	scr_size[3];
452};
453.Ed
454.Pp
455.It Dv GIO_SCRNMAP Ar scrmap_t *map
456.It Dv PIO_SCRNMAP Ar scrmap_t *map
457Get or set the screen map for the current (virtual) console. The
458.Vt scrmap_t
459argument structure is defined as follows:
460.Bd -literal
461struct _scrmap {
462	char	scrmap[256];
463};
464.Ed
465.Pp
466.It Dv GIO_ATTR Ar int *attr
467Get the current text attribute.
468.Pp
469.It Dv GIO_COLOR Ar int *color
470Get the current text color.
471.Pp
472.It Dv CONS_CURRENT Ar int *type
473Get the adapter type. This is equivalent to
474.Dv FBIO_ADPTYPE .
475.Pp
476.It Dv CONS_GET Ar int *mode
477Get the current video mode. This is equivalent to
478.Dv FBIO_GETMODE .
479.Pp
480.It Dv CONS_SET Ar int *mode
481Set the current video mode. This is equivalent to
482.Dv FBIO_SETMODE .
483.Pp
484.It Dv CONS_BLANKTIME Ar int *time
485Set the screen saver blank interval (in seconds).
486.Pp
487.It Dv CONS_CURSORTYPE Ar int *type
488Set the text cursor shape. The argument
489.Dv type
490can be one or more of the following:
491.Pp
492.Bl -tag -width CONS_BLINK_CURSOR -compact
493.It Dv CONS_BLINK_CURSOR
494Set for a blinking cursor, unset for a non-blinking cursor.
495.It Dv CONS_CHAR_CURSOR
496Set for an underscore-shaped cursor, unset for a rectangle.
497.El
498.Pp
499.It Dv CONS_BELLTYPE Ar int *type
500Set the bell type. The argument
501.Dv type
502is one or more of:
503.Pp
504.Bl -tag -width CONS_VISUAL_BELL -compact
505.It Dv CONS_VISUAL_BELL
506Set for a visual bell, unset for an audible bell.
507.It Dv CONS_QUIET_BELL
508Set to enable the bell, unset to disable it.
509.El
510.Pp
511.It Dv CONS_HISTORY Ar int *size
512Set the history (scroll back) buffer size (in lines).
513.Pp
514.It Dv CONS_CLRHIST
515Clear the history (scroll back) buffer.
516.Pp
517.It Dv CONS_IDLE Ar int *idle
518Check if the (virtual) console has been idle.
519.Pp
520.It Dv CONS_SAVERMODE Ar int *mode
521Set the screen saver mode. The argument
522.Dv mode
523can be one of:
524.Pp
525.Bl -tag -width CONS_LKM_SAVER -compact
526.It Dv CONS_NO_SAVER
527Disable screen saver
528.It Dv CONS_USR_SAVER
529Enable screen saver
530.It Dv CONS_LKM_SAVER
531Add a new screen saver
532.El
533.Pp
534.It Dv CONS_SAVERSTART Ar int *start
535Start or stop the screen saver.
536.Pp
537.It Dv PIO_FONT8x8 Ar fnt8_t *font
538.It Dv GIO_FONT8x8 Ar fnt8_t *font
539Get or set the 8x8 font. The
540.Vt fnt8_t
541argument structure is defined as follows:
542.Bd -literal
543struct fnt8 {
544	char	fnt8x8[8*256];
545};
546.Ed
547.Pp
548.It Dv PIO_FONT8x14 Ar fnt14_t *font
549.It Dv GIO_FONT8x14 Ar fnt14_t *font
550Get or set the 8x14 font. The
551.Vt fnt14_t
552argument structure is defined as follows:
553.Bd -literal
554struct fnt14 {
555	char	fnt8x14[14*256];
556};
557.Ed
558.Pp
559.It Dv PIO_FONT8x16 Ar fnt16_t *font
560.It Dv GIO_FONT8x16 Ar fnt16_t *font
561Get or set the 8x16 font. The
562.Vt fnt16_t
563argument structure is defined as follows:
564.Bd -literal
565struct fnt16 {
566	char	fnt8x16[16*256];
567};
568.Ed
569.Pp
570.It Dv CONS_GETINFO Ar vid_info_t *info
571Get information about the current video mode. The
572.Vt vid_info_t
573structure is defined as follows:
574.Bd -literal
575struct vid_info {
576	short		size;
577	short		m_num;
578	u_short		font_size;
579	u_short		mv_row, mv_col;
580	u_short		mv_rsz, mv_csz;
581	struct colors	mv_norm,
582			mv_rev,
583			mv_grfc;
584	u_char		mv_ovscan;
585	u_char		mk_keylock;
586};
587.Ed
588.Pp
589.It Dv CONS_GETVERS Ar int *version
590Get the version of the driver.
591.Pp
592.It Dv CONS_CURRENTADP Ar int *adapter
593Get the video adapter index. This is equivalent to
594.Dv FBIO_ADAPTER .
595.Pp
596.It Dv CONS_ADPINFO Ar video_adapter_info_t *info
597Get the video adapter information. This is equivalent to
598.Dv FBIO_ADPINFO .
599.Pp
600.It Dv CONS_MODEINFO Ar video_info_t *info
601Get the video mode information. This is equivalent to
602.Dv FBIO_MODEINFO .
603.Pp
604.It Dv CONS_FINDMODE Ar video_info_t *info
605Find a video mode. This is equivalent to
606.Dv FBIO_FINDMODE .
607.Pp
608.It Dv CONS_SETWINORG Ar u_int *origin
609Set the frame buffer window origin. This is equivalent to
610.Dv FBIO_SETWINORG .
611.Pp
612.It Dv CONS_SETKBD Ar int *kbd
613Set a new keyboard.
614.Pp
615.It Dv CONS_RELKBD
616Release the current keyboard.
617.Pp
618.It Dv CONS_SCRSHOT Ar scrshot_t *data
619Make a snapshot of the current video buffer. The
620.Vt scrshot_t
621structure is defined as:
622.Bd -literal
623struct scrshot {
624	int		xsize;
625	int		ysize;
626	u_int16_t*	buf;
627};
628.Ed
629.Pp
630.It Dv CONS_GETTERM Ar term_info_t *info
631.It Dv CONS_SETTERM Ar term_info_t *info
632Get or set terminal characteristics. The
633.Vt term_info_t
634structure is defined as:
635.Bd -literal
636struct term_info {
637	int		ti_index;
638	int		ti_flags;
639	u_char		ti_name[TI_NAME_LEN];
640	u_char		ti_desc[TI_DESC_LEN];
641};
642.Ed
643.Pp
644.It Dv VT_OPENQRY Ar int *term
645Get the next available terminal.
646.Pp
647.It Dv VT_SETMODE Ar vtmode_t *mode
648.It Dv VT_GETMODE Ar vtmode_t *mode
649Get or set the terminal switching mode. The
650.Vt vtmode_t
651argument structure is defined as follows:
652.Bd -literal
653struct vt_mode {
654	char		mode;
655	char		waitv;
656	short		relsig;
657	short		acqsig;
658	short		frsig;
659};
660.Ed
661.Pp
662.It Dv VT_RELDISP Ar int *ack
663Acknowledge the release or acquisition of a terminal. The
664.Dv ack
665argument can be one of:
666.Pp
667.Bl -tag -width VT_ACKACQ -compact
668.It Dv VT_FALSE
669The user refuses to release the screen, abort
670.It Dv VT_TRUE
671The user has released the screen, go on
672.It Dv VT_ACKACQ
673Acquisition of the screen acknowledged, switch completed
674.El
675.Pp
676.It Dv VT_ACTIVATE Ar int *term
677Activate the specified terminal.
678.Pp
679.It Dv VT_WAITACTIVE Ar int *term
680Wait until the specified terminal is active.
681.Pp
682.It Dv VT_GETACTIVE Ar int *term
683Get the currently active terminal.
684.Pp
685.It Dv VT_GETINDEX Ar int *index
686Get the index of the terminal.
687.Pp
688.It Dv VT_LOCKSWITCH Ar int *lock
689Prevent or permit terminal switching.
690.El
691.Sh FILES
692.Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
693.It Pa /dev/console
694.It Pa /dev/consolectl
695.It Pa /dev/ttyv?
696virtual terminals
697.It Pa /etc/ttys
698terminal initialization information
699.It Pa /usr/share/syscons/fonts/*
700font files
701.It Pa /usr/share/syscons/keymaps/*
702key map files
703.It Pa /usr/share/syscons/scrmaps/*
704screen map files
705.El
706.Sh EXAMPLES
707As the
708.Nm
709driver requires the keyboard driver and the video card driver,
710the kernel configuration file should contain the following lines.
711.Pp
712.D1 Cd device atkbdc0 at isa? port IO_KBD
713.D1 Cd device atkbd0 at atkbdc? irq 1
714.D1 Cd device vga0 at isa?
715.D1 Cd device sc0 at isa?
716.D1 Cd pseudo-device splash
717.Pp
718If you do not intend to load the splash image or use the screen saver,
719the last line is not necessary, and can be omitted.
720.Pp
721Note that the keyboard controller driver
722.Nm atkbdc
723is required by the keyboard driver
724.Nm atkbd .
725.Pp
726The following lines will set the default colors.
727The normal text will be green on black background.
728The reversed text will be yellow on green background.
729Note that you cannot put any white space inside the quoted string,
730because of the current implementation of
731.Xr config 8 .
732.Pp
733.D1 Cd "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)"
734.D1 Cd "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)"
735.Pp
736The following lines will set the default colors of the kernel message.
737The kernel message will be printed bright red on black background.
738The reversed message will be black on red background.
739.Pp
740.D1 Cd "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)"
741.D1 Cd "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)"
742.Pp
743The following example adds the font files
744.Pa cp850-8x16.fnt ,
745.Pa cp850-8x14.font
746and
747.Pa cp850-8x8.font
748to the kernel.
749.Pp
750.D1 Cd "options SC_DFLT_FONT"
751.D1 Cd "makeoptions SC_DFLT_FONT=cp850"
752.D1 Cd "device sc0 at isa?"
753.\".Sh DIAGNOSTICS
754.Sh CAVEATS
755The amount of data that is possible to insert from the cut buffer is limited
756by the
757.Brq Dv MAX_INPUT ,
758a system limit on the number of bytes that may be stored in the terminal
759input queue - usually 1024 bytes
760(see
761.Xr termios 4 ) .
762.Sh SEE ALSO
763.Xr kbdcontrol 1 ,
764.Xr login 1 ,
765.Xr vidcontrol 1 ,
766.Xr atkbd 4 ,
767.Xr atkbdc 4 ,
768.Xr keyboard 4 ,
769.Xr screen 4 ,
770.Xr splash 4 ,
771.Xr sysmouse 4 ,
772.Xr ukbd 4 ,
773.Xr vga 4 ,
774.Xr kbdmap 5 ,
775.Xr rc.conf 5 ,
776.Xr ttys 5 ,
777.Xr config 8 ,
778.Xr getty 8 ,
779.Xr kldload 8 ,
780.Xr moused 8
781.Sh HISTORY
782The
783.Nm
784driver first appeared in
785.Fx 1.0 .
786.Sh AUTHORS
787.An -nosplit
788The
789.Nm
790driver was written by
791.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org .
792This manual page was written by
793.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org
794and
795.An Sascha Wildner .
796.Sh BUGS
797This manual page is incomplete and needs revision.
798