1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/share/man/man4/man4.i386/syscons.4
Kazutaka YOKOTA c69d22506e - Revise text, and fix typos and grammatical errors.
- Add syscons.4.

If there still are errors, whether technical or grammatical, they are
entirely mine, not the reviewers'.

Reviewed by: sos, jkh, archie, Nick Hilliard <nick@iol.ie>
1999-02-10 14:25:03 +00:00

419 lines
12 KiB
Groff
Raw Blame History

.\"
.\" Copyright (c) 1999
.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer as
.\" the first lines of this file unmodified.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $Id: $
.\"
.Dd February 9, 1999
.Dt SYSCONS 4
.Os FreeBSD
.Sh NAME
.Nm syscons ,
.Nm sc
.Nd
the console driver
.Sh SYNOPSIS
.Cd "options" \&"MAXCONS=N\&"
.\".Cd "options" \&"SC_ALT_MOUSE_IMAGE\&"
.Cd "options" \&"SC_DISABLE_REBOOT\&"
.Cd "options" \&"SC_HISTORY_SIZE=N\&"
.Cd "options" \&"SC_MOUSE_CHAR=C\&"
.\".Cd "options" \&"SC_NO_CUTPASTE\&"
.\".Cd "options" \&"SC_NO_FONT_LOADING\&"
.\".Cd "options" \&"SC_NO_HISTORY\&"
.\".Cd "options" \&"SC_NO_SYSMOUSE\&"
.\".Cd "options" \&"SC_PIXEL_MODE\&"
.Cd "options" \&"STD8X16FONT\&"
.Cd "makeoptions" \&"STD8X16FONT\&"=\&"_font_name_\&"
.Cd "device sc0 at isa? tty"
.Sh DESCRIPTION
The
.Nm
driver provides multiple virtual terminals.
It resembles the SCO color console driver.
.Pp
The
.Nm
driver is implemented on top of the keyboard driver
.Pq Xr atkbd 4
and the video card driver
.Pq Xr vga 4
and so requires both of them to be configured in the system.
.Pp
There can be only one
.Nm
device defined in the system.
.Ss Virtual Terminals
The
.Nm
driver provides multiple virtual terminals which appear as if they were
separate terminals.
One virtual terminal is considered current and exclusively
occupies the screen and the keyboard; the other virtual terminals
are placed in the background.
.Pp
In order to use virtual terminals, they must be individually
marked ``on'' in
.Pa /etc/ttys
so that
.Xr getty 8
will recognize them to be active and run
.Xr login 1
to let the user to login to the system.
By default, only the first three virtual terminals are activated in
.Pa /etc/ttys .
.Pp
You press the
.Em Alt
key and a switch key to switch between
virtual terminals.
The following table summarizes the correspondence between the switch
key and the virtual terminal.
.Bd -literal -offset indent
Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyv10
Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyv11
Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyv12
Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyv13
Alt-F5 ttyv4 Alt-F11 ttyv10 Shift-Alt-F5 ttyv14
Alt-F6 ttyv5 Alt-F12 ttyv11 Shift-Alt-F6 ttyv15
.Ed
.Pp
You can also use the ``nscr'' key (usually the
.Em PrintScreen
key on the AT Enhanced keyboard) to cycle available virtual terminals.
.Pp
The default number of available virtual terminals is 16.
This can be changed by the kernel configuration option
.Em MAXCONS
(see below).
.Pp
Note that the X server usually requires a virtual terminal for display
purposes, so at least one terminal must be left unused by
.Xr getty 8
so that it can be used by the X server.
.Ss Key Definitions and Function Key Strings
The
.Nm
driver, in conjunction with the keyboard driver, allows the user
to change key definitions and function key strings.
The
.Xr kbdcontrol 1
command will load a key definition file (known as ``keymap'' file),
dump the current keymap, and assign a string to a function key.
See
.Xr keyboard 4
and
.Xr keymap 5
for the keymap file.
.Pp
You may want to set the
.Ar keymap
variable in
.Pa /etc/rc.conf
to the desired keymap file so that it will be automatically loaded
when the system starts up.
.Ss Software Font
For most modern video cards, e.g. VGA, the
.Nm
driver and the video card driver allow the user to change
the font used on the screen.
The
.Xr vidcontrol 1
command can be used to load a font file from
.Pa /usr/share/syscons/fonts .
.Pp
The font comes in various sizes: 8x8, 8x14 and 8x16.
The 8x16 font is typically used for the VGA card in the 80-column-
by-25-line mode.
Other video modes may require different size of font.
It is better to always load these three sizes of the same font.
.Pp
You may set
.Ar font8x8 ,
.Ar font8x14
and
.Ar font8x16
variables in
.Pa /etc/rc.conf
to the desired font files so that they will be automatically loaded
when the system starts up.
.Pp
Optionally you can make a particular font file as the default 8x16 font.
See the
.Em STD8X16FONT
option below.
.Ss Screen Map
If your video card does not support software font, you may still be able
to have similar effect by re-mapping font hard-wired in the video card.
Use
.Xr vidcontrol 1
to load a screen map file which defines mapping between character codes.
.Ss Mouse Support and Copy-and-Paste
You can use your mouse to copy text on the screen and paste it as if
it is typed by hand.
You must be running the mouse daemon
.Xr moused 8
and enable the mouse cursor in the virtual terminal via
.Xr vidcontrol 1 .
.Pp
Pressing the mouse button 1 (usually the left button) will start selection.
Releasing the button 1 will end the selection process.
The selected text will be marked by inverting foreground and
background colors.
You can press the button 3 (usually the right button) to extend
the selected region.
The selected text is placed in the copy buffer and can be pasted
at the cursor position by your pressing the button 2 (usually the
middle button) as many times as you like.
.Ss Back Scrolling
The
.Nm
driver allows the user to browse the output which has ``scrolled off''
from the top of the screen.
.Pp
Press the ``slock'' key (usually
.Em ScrllLock
and/or
.Em Pause
keys on many AT Enhanced keyboards) and the terminal is
in the ``back scrolling'' mode.
It is indicated by the
.Em Scroll Lock
LED.
Use arrow keys,
.Em Page Up/Down
keys and
.Em Home/End
keys to scroll buffered terminal output.
Press the ``slock'' key again to get back to the normal terminal mode.
.Pp
The size of the back-scroll buffer can be set by the
.Em SC_HISTORY_SIZE
option below.
.Ss Screen Saver
The
.Nm
driver can be made to put up the screen saver if the current
virtual terminal is idle, that is, the user is not typing
on the keyboard nor moving mouse.
See
.Xr splash 4
and
.Xr vidcontrol 1
for more details.
.Sh DRIVER CONFIGURATION
.Ss Kernel Configuration Options
The following kernel configuration options control the
.Nm
driver.
.Bl -tag -width MOUSE
.It Em MAXCONS=N
This option sets the number of virtual terminals to
.Fa N .
The default value is 16.
.\".It Em SC_ALT_MOUSE_IMAGE
.\"This option selects the alternative way of displaying the mouse cursor
.\"in the virtual terminal.
.\"It may be vastly costly for some video cards to draw the arrow-shaped
.\"cursor and you may want to try this option.
.\"However, the appearance of the alternative mouse cursor may not be
.\"very appealing.
.It Em SC_DISABLE_REBOOT
This option disables the ``reboot'' key (by default, it is
.Em Ctl-Alt-Del ),
so that the casual user may not accidentally reboot the system.
.It Em SC_HISTORY_SIZE=N
Sets the size of back scroll buffer to
.Fa N
lines.
The default value is 100.
.It Em SC_MOUSE_CHAR=C
.\"Unless the
.\".Em SC_ALT_MOUSE_IMAGE
.\"option above is specified, the
The
.Nm
driver reserves four consecutive character codes in order to display the
mouse cursor in the virtual terminals in some systems.
This option specifies the first character code to
.Fa C
to be used for this purpose.
The default value is 0xd0.
A good candidate is 0x03.
.\".It Em SC_PIXEL_MODE
.It Em STD8X16FONT
This option will specify the default 8x16 font.
Without this option, the
.Nm
driver will use whatever font already loaded in the video card,
unless you explicitly load software font at startup.
See
.Sx EXAMPLE
below.
.El
.\".Pp
.\"The following options will remove some features from the
.\".Nm
.\"driver and save kernel memory.
.\".Bl -tag -width MOUSE
.\".It Em SC_NO_CUTPASTE
.\"This option disables ``copy and paste'' operation in virtual
.\"terminals.
.\".It Em SC_NO_FONT_LOADING
.\"The
.\".Nm
.\"driver can load software font on some video cards.
.\"This option removes this feature.
.\".It Em SC_NO_HISTORY
.\"This option disables back-scrolling in virtual terminals.
.\".It Em SC_NO_SYSMOUSE
.\"This option removes mouse support in the
.\".Nm
.\"driver.
.\"The mouse daemon
.\".Xr moused 8
.\"will fail if this option is defined.
.\"This option implies the
.\".Em SC_NO_CUTPASTE
.\"option too.
.\".El
.Ss Driver Flags
The following driver flags can be used to control the
.Nm
driver.
They can be set either in the kernel configuration file
.Pq see Xr config 8 ,
or else in the User Configuration Menu at boot
time
.Pq see Xr boot 8 .
.Bl -tag -width bit_0
.It bit 0 (VISUAL_BELL)
Uses the ``visual'' bell.
The screen will blink instead of generating audible sound.
.It bit 1,2 (CURSOR_TYPE)
This option specifies the cursor appearance.
Possible values are:
.Bl -tag -width TYPE -compact
.It Em 0
normal block cursor
.It Em 2
blinking block cursor
.It Em 4
underline cursor
.It Em 6
blinking underline (aka destructive) cursor
.El
.It bit 6 (QUIET_BELL)
This option suppresses the bell, whether audible or visual,
if it is rung in a background virtual terminal.
.It bit 7 (VESA800X600)
This option puts the video card in the VESA 800x600 dots, 16 color
mode.
It may be useful for laptop computers for which the 800x600 mode
is otherwise unsupported by the X server.
Note that the ``copy-and-paste'' function is not currently supported in
this mode and the mouse pointer will not be displayed.
.El
.Sh FILES
.Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
.It Pa /dev/console
.It Pa /dev/consolectl
.It Pa /dev/ttyv?
virtual terminals
.It Pa /etc/ttys
terminal initialization information
.It Pa /usr/share/syscons/fonts/*
font files
.It Pa /usr/share/syscons/keymaps/*
key map files
.It Pa /usr/share/syscons/scrmaps/*
screen map files
.El
.Sh EXAMPLE
As the
.Nm
driver requires the keyboard driver and the video card driver,
the kernel configuration file should contain the following lines.
.Pp
.Bd -literal -offset indent
device atkbdc0 at isa? port IO_KBD tty
device atkbd0 at isa? tty irq 1
device vga0 at isa? conflicts
device sc0 at isa? tty
pseudo-device splash
.Ed
.Pp
If you do not intend to load the splash image or use the screen saver,
the last line is not necessary, and can be omitted.
.Pp
Note that the keyboard controller driver
.Nm atkbdc
is required by the keyboard driver
.Nm atkbd .
.Pp
The following example adds the font file
.Pa /usr/share/syscons/fonts/cp850-8x16.fnt
to the kernel as the default 8x16 font.
.Pp
.Dl "options" \&"STD8X16FONT\&"
.Dl "makeoptions" \&"STD8X16FONT\&"=\&"cp850\&"
.Dl "device sc0 at isa? tty"
.Pp
.\".Sh DIAGNOSTICS
.\".Sh CAVEATS
.Sh BUGS
This manual page is incomplete and urgently needs revision.
.Sh SEE ALSO
.Xr kbdcontrol 1 ,
.Xr kldload 1 ,
.Xr login 1 ,
.Xr vidcontrol 1 ,
.Xr atkbd 4 ,
.Xr atkbdc 4 ,
.Xr keyboard 4 ,
.Xr screen 4 ,
.Xr splash 4 ,
.Xr vga 4 ,
.Xr keymap 5 ,
.Xr rc.conf 5 ,
.Xr screenmap 5 ,
.Xr ttys 5 ,
.Xr config 8 ,
.Xr getty 8 ,
.Xr moused 8 .
.Sh HISTORY
The
.Nm
driver first appeared in
.Fx 1.0 .
.Sh AUTHORS
The
.Nm
driver was written by
.An S<EFBFBD>ren Schmidt Aq sos@FreeBSD.org .
This manual page was written by
.An Kazutaka Yokota Aq yokota@FreeBSD.org .