2014-05-10 03:24:45 +00:00
|
|
|
.\" Copyright (c) 2014 Warren Block
|
|
|
|
.\" 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.
|
|
|
|
.\" 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 AUTHORS AND CONTRIBUTORS ``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 AUTHORS OR CONTRIBUTORS 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.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2014-10-20 14:48:20 +00:00
|
|
|
.Dd October 20, 2014
|
2014-05-10 13:10:42 +00:00
|
|
|
.Dt "VIRTUAL TERMINALS" 4
|
2014-05-10 03:24:45 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm vt
|
|
|
|
.Nd virtual terminal console driver
|
|
|
|
.Sh SYNOPSIS
|
2014-06-27 19:57:57 +00:00
|
|
|
.Cd "options TERMINAL_KERN_ATTR=_attribute_"
|
|
|
|
.Cd "options TERMINAL_NORM_ATTR=_attribute_"
|
2014-05-10 03:24:45 +00:00
|
|
|
.Cd "options VT_MAXWINDOWS=N"
|
|
|
|
.Cd "options VT_ALT_TO_ESC_HACK=1"
|
|
|
|
.Cd "options VT_TWOBUTTON_MOUSE"
|
|
|
|
.Cd "options VT_FB_DEFAULT_WIDTH=X"
|
|
|
|
.Cd "options VT_FB_DEFAULT_HEIGHT=Y"
|
|
|
|
.Cd "options SC_NO_CUTPASTE"
|
|
|
|
.Cd "device vt"
|
|
|
|
.Pp
|
|
|
|
In
|
|
|
|
.Xr loader.conf 5 :
|
|
|
|
.Cd hw.vga.textmode=1
|
2014-06-27 17:50:33 +00:00
|
|
|
.Cd kern.vty=vt
|
2014-11-03 14:57:41 +00:00
|
|
|
.Cd kern.vt.fb.default_mode="<X>x<Y>"
|
|
|
|
.Cd kern.vt.fb.modes.<connector>="<X>x<Y>"
|
2014-10-16 18:49:50 +00:00
|
|
|
.Pp
|
|
|
|
In
|
|
|
|
.Xr loader.conf 5 or
|
|
|
|
.Xr sysctl.conf 5 :
|
|
|
|
.Cd kern.vt.kbd_halt=1
|
|
|
|
.Cd kern.vt.kbd_poweroff=1
|
|
|
|
.Cd kern.vt.kbd_reboot=1
|
|
|
|
.Cd kern.vt.kbd_debug=1
|
|
|
|
.Cd kern.vt.kbd_panic=0
|
2014-05-10 03:24:45 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
device provides multiple virtual terminals with an extensive feature
|
|
|
|
set:
|
|
|
|
.Bl -item -offset indent
|
|
|
|
.It
|
|
|
|
Unicode UTF-8 text with double-width characters.
|
|
|
|
.It
|
|
|
|
Large font maps in graphics mode, including support for Asian
|
|
|
|
character sets.
|
|
|
|
.It
|
|
|
|
Graphics-mode consoles.
|
|
|
|
.It
|
|
|
|
Integration with
|
|
|
|
KMS
|
|
|
|
.Pq Kernel Mode Setting
|
|
|
|
video drivers for switching between the
|
|
|
|
.Em X Window System
|
|
|
|
and virtual terminals.
|
|
|
|
.El
|
|
|
|
.Ss Virtual Terminals
|
|
|
|
Multiple virtual terminals are provided on a single computer.
|
|
|
|
Up to sixteen virtual terminals can be defined.
|
|
|
|
A single virtual terminal is connected to the screen and keyboard
|
|
|
|
at a time.
|
|
|
|
Key combinations are used to select a virtual terminal.
|
|
|
|
Alt-F1 through Alt-F12 correspond to the first twelve virtual terminals.
|
|
|
|
If more than twelve virtual terminals are created, Shift-Alt-F1 through
|
|
|
|
Shift-Alt-F4 are used to switch to the additional terminals.
|
|
|
|
.Ss Copying and Pasting Text with a Mouse
|
|
|
|
Copying and pasting text from the screen with a mouse is supported.
|
|
|
|
Press and hold down mouse button 1, usually the left button, while
|
|
|
|
moving the mouse to select text.
|
|
|
|
Selected text is highlighted with reversed foreground and background
|
|
|
|
colors.
|
|
|
|
To select more text after releasing mouse button 1, press mouse button
|
|
|
|
3, usually the right button.
|
|
|
|
To paste text that has been selected, press mouse button 2, usually the
|
|
|
|
middle button.
|
|
|
|
The text is entered as if it were typed at the keyboard.
|
|
|
|
The
|
|
|
|
.Dv VT_TWOBUTTON_MOUSE
|
|
|
|
kernel option can be used with mice that only have two buttons.
|
|
|
|
Setting this option makes the second mouse button into the
|
|
|
|
paste button.
|
|
|
|
See
|
|
|
|
.Xr moused 8
|
|
|
|
for more information.
|
|
|
|
.Ss Scrolling Back
|
|
|
|
Output that has scrolled off the screen can be reviewed by pressing the
|
|
|
|
Scroll Lock key, then scrolling up and down with the arrow keys.
|
|
|
|
The Page Up and Page Down keys scroll up or down a full screen at a
|
|
|
|
time.
|
|
|
|
The Home and End keys jump to the beginning or end of the scrollback
|
|
|
|
buffer.
|
|
|
|
When finished reviewing, press the Scroll Lock key again to return to
|
|
|
|
normal use.
|
|
|
|
.Sh DRIVER CONFIGURATION
|
|
|
|
.Ss Kernel Configuration Options
|
|
|
|
These kernel options control the
|
|
|
|
.Nm
|
|
|
|
driver.
|
|
|
|
.Bl -tag -width MAXCONS
|
2014-07-02 22:16:01 +00:00
|
|
|
.It Dv TERMINAL_NORM_ATTR= Ns Pa attribute
|
|
|
|
.It Dv TERMINAL_KERN_ATTR= Ns Pa attribute
|
|
|
|
These options allow changing the default colors used for normal and kernel
|
|
|
|
text.
|
2014-06-27 19:57:57 +00:00
|
|
|
Available colors are defined in
|
|
|
|
.In sys/terminal.h .
|
|
|
|
See
|
|
|
|
.Sx EXAMPLES
|
|
|
|
below.
|
2014-05-10 03:24:45 +00:00
|
|
|
.It Dv VT_MAXWINDOWS=N
|
|
|
|
Set the number of virtual terminals to be created to
|
|
|
|
.Fa N .
|
|
|
|
The value defaults to 12.
|
|
|
|
.It Dv VT_ALT_TO_ESC_HACK=1
|
|
|
|
When the Alt key is held down while pressing another key, send an ESC
|
|
|
|
sequence instead of the Alt key.
|
|
|
|
.It Dv VT_TWOBUTTON_MOUSE
|
|
|
|
If defined, swap the functions of mouse buttons 2 and 3.
|
|
|
|
In effect, this makes the right-hand mouse button perform a paste.
|
|
|
|
These options are checked in the order shown.
|
|
|
|
.It Dv SC_NO_CUTPASTE
|
|
|
|
Disable mouse support.
|
|
|
|
.It VT_FB_DEFAULT_WIDTH=X
|
|
|
|
Set the default width to
|
|
|
|
.Fa X .
|
|
|
|
.It VT_FB_DEFAULT_HEIGHT=Y
|
|
|
|
Set the default height to
|
|
|
|
.Fa Y .
|
|
|
|
.El
|
|
|
|
.Sh BACKWARDS COMPATIBILITY
|
|
|
|
Several options are provided for compatibility with the previous
|
|
|
|
console device,
|
|
|
|
.Xr sc 4 .
|
|
|
|
These options will be removed in a future
|
|
|
|
.Fx
|
|
|
|
version.
|
|
|
|
.Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE"
|
|
|
|
.It Sy vt Option Name Ta Sy sc Option Name
|
2014-06-27 19:57:57 +00:00
|
|
|
.It Dv TERMINAL_KERN_ATTR Ta Dv SC_KERNEL_CONS_ATTR
|
|
|
|
.It Dv TERMINAL_NORM_ATTR Ta Dv SC_NORM_ATTR
|
2014-05-10 03:24:45 +00:00
|
|
|
.It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE
|
|
|
|
.It Dv VT_MAXWINDOWS Ta Dv MAXCONS
|
|
|
|
.It none Ta Dv SC_NO_CUTPASTE
|
|
|
|
.El
|
|
|
|
.Sh START-UP OPERATION WITH X86 BIOS SYSTEMS
|
|
|
|
The computer BIOS starts in text mode, and
|
|
|
|
the
|
|
|
|
.Fx
|
|
|
|
.Xr loader 8
|
|
|
|
runs, loading the kernel.
|
|
|
|
If
|
|
|
|
.Va hw.vga.textmode
|
|
|
|
is set, the system remains in text mode.
|
|
|
|
Otherwise,
|
|
|
|
.Nm
|
|
|
|
switches to 640x480x16 VGA mode using
|
2014-07-02 22:16:01 +00:00
|
|
|
.Cm vt_vga .
|
2014-05-10 03:24:45 +00:00
|
|
|
If a KMS
|
2014-11-03 14:57:41 +00:00
|
|
|
.Pq Kernel Mode Setting
|
2014-05-10 03:24:45 +00:00
|
|
|
video driver is available, the display is switched to high resolution
|
|
|
|
and the KMS driver takes over.
|
|
|
|
When a KMS driver is not available,
|
2014-07-02 22:16:01 +00:00
|
|
|
.Cm vt_vga
|
2014-05-10 03:24:45 +00:00
|
|
|
remains active.
|
|
|
|
.Sh LOADER TUNABLES
|
|
|
|
These settings can be entered at the
|
|
|
|
.Xr loader 8
|
|
|
|
prompt or in
|
|
|
|
.Xr loader.conf 5 .
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Va hw.vga.textmode
|
|
|
|
Set to 1 to use virtual terminals in text mode instead of graphics mode.
|
|
|
|
Features that require graphics mode, like loadable fonts, will be
|
|
|
|
disabled.
|
2014-06-27 17:50:33 +00:00
|
|
|
.It Va kern.vty
|
2014-10-16 18:49:50 +00:00
|
|
|
Set this value to
|
2014-07-02 22:16:01 +00:00
|
|
|
.Ql vt
|
|
|
|
or
|
2014-10-16 18:49:50 +00:00
|
|
|
.Ql sc
|
|
|
|
to override the default driver used for the system console.
|
|
|
|
By default,
|
2014-07-02 22:16:01 +00:00
|
|
|
.Xr sc 4
|
2014-10-16 18:49:50 +00:00
|
|
|
is used on computers that boot from BIOS, and
|
|
|
|
.Nm
|
|
|
|
is used on computers that boot from UEFI.
|
2014-11-03 14:57:41 +00:00
|
|
|
.It Va kern.vt.fb.default_mode
|
|
|
|
Set this value to a graphic mode to override the default mode picked by the
|
|
|
|
.Nm
|
2014-11-03 16:01:44 +00:00
|
|
|
backend.
|
|
|
|
The mode is applied to all output connectors.
|
|
|
|
This is currently only supported by the
|
2014-11-03 14:57:41 +00:00
|
|
|
.Cm vt_fb
|
|
|
|
backend when it's paired with a KMS video driver.
|
|
|
|
.It Va kern.vt.fb.modes. Ns Pa connector_name
|
|
|
|
Set this value to a graphic mode to override the default mode picked by the
|
|
|
|
.Nm
|
2014-11-03 16:01:44 +00:00
|
|
|
backend.
|
|
|
|
This mode is applied to the output connector
|
2014-11-03 14:57:41 +00:00
|
|
|
.Pa connector_name
|
|
|
|
only. It has precedence over
|
|
|
|
.Va kern.vt.fb.default_mode .
|
2014-11-03 15:25:48 +00:00
|
|
|
The names of available connector names can be found in
|
|
|
|
.Xr dmesg 8
|
2014-11-03 16:01:44 +00:00
|
|
|
after loading the KMS driver.
|
|
|
|
It will contain a list of connectors and their associated tunables.
|
|
|
|
This is currently only supported by the
|
2014-11-03 14:57:41 +00:00
|
|
|
.Cm vt_fb
|
|
|
|
backend when it's paired with a KMS video driver.
|
|
|
|
.El
|
2014-10-16 18:49:50 +00:00
|
|
|
.Sh KEYBOARD SYSCTL TUNABLES
|
|
|
|
These settings control whether certain special key combinations are enabled or
|
|
|
|
ignored.
|
|
|
|
The specific key combinations can be configured by using a
|
|
|
|
.Xr keymap 5
|
|
|
|
file.
|
|
|
|
.Pp
|
|
|
|
These settings can be entered at the
|
|
|
|
.Xr loader 8
|
|
|
|
prompt or in
|
|
|
|
.Xr loader.conf 5
|
|
|
|
and can also be changed at runtime with the
|
|
|
|
.Xr sysctl 8
|
|
|
|
command.
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Va kern.vt.kbd_halt
|
|
|
|
Enable halt keyboard combination.
|
|
|
|
.It Va kern.vt.kbd_poweroff
|
|
|
|
Enable power off key combination.
|
|
|
|
.It Va kern.vt.kbd_reboot.
|
|
|
|
Enable reboot key combination, usually Ctrl+Alt+Del.
|
|
|
|
.It Va kern.vt.kbd_debug
|
|
|
|
Enable debug request key combination, usually Ctrl+Alt+Esc.
|
|
|
|
.It Va kern.vt.kbd_panic
|
|
|
|
Enable panic key combination.
|
2014-05-10 03:24:45 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
2014-08-26 08:13:30 +00:00
|
|
|
.Bl -tag -width /usr/share/vt/keymaps/* -compact
|
2014-05-10 03:24:45 +00:00
|
|
|
.It Pa /dev/console
|
|
|
|
.It Pa /dev/consolectl
|
|
|
|
.It Pa /dev/ttyv*
|
|
|
|
virtual terminals
|
|
|
|
.It Pa /etc/ttys
|
|
|
|
terminal initialization information
|
2014-08-26 08:13:30 +00:00
|
|
|
.It Pa /usr/share/vt/fonts/*.fnt
|
|
|
|
console fonts
|
|
|
|
.It Pa /usr/share/vt/keymaps/*.kbd
|
|
|
|
keyboard layouts
|
2014-05-10 03:24:45 +00:00
|
|
|
.El
|
2014-07-02 22:16:01 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
This example changes the default color of normal text to green on a
|
|
|
|
black background, or black on a green background when reversed.
|
|
|
|
Note that white space cannot be used inside the attribute string
|
|
|
|
because of the current implementation of
|
|
|
|
.Xr config 8 .
|
|
|
|
.Pp
|
|
|
|
.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)"
|
|
|
|
.Pp
|
|
|
|
This line changes the default color of kernel messages to be bright red
|
|
|
|
on a black background, or black on a bright red background when reversed.
|
|
|
|
.Pp
|
|
|
|
.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)"
|
2014-11-03 14:57:41 +00:00
|
|
|
.Pp
|
|
|
|
To set a 1024x768 mode on all output connectors, put the following line in
|
|
|
|
.Pa /boot/loader.conf :
|
|
|
|
.Pp
|
|
|
|
.Dl kern.vt.fb.default_mode="1024x768"
|
|
|
|
.Pp
|
|
|
|
To set a 800x600 only on a laptop builtin screen, use the following line instead:
|
|
|
|
.Pp
|
|
|
|
.Dl kern.vt.fb.modes.LVDS-1="800x600"
|
|
|
|
.Pp
|
|
|
|
The connector name was found in
|
|
|
|
.Xr dmesg 8 :
|
|
|
|
.Pp
|
|
|
|
.Dl info: [drm] Connector LVDS-1: get mode from tunables:
|
|
|
|
.Dl info: [drm] - kern.vt.fb.modes.LVDS-1
|
|
|
|
.Dl info: [drm] - kern.vt.fb.default_mode
|
2014-05-10 03:24:45 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kbdcontrol 1 ,
|
|
|
|
.Xr login 1 ,
|
|
|
|
.Xr vidcontrol 1 ,
|
|
|
|
.Xr atkbd 4 ,
|
|
|
|
.Xr atkbdc 4 ,
|
|
|
|
.Xr keyboard 4 ,
|
|
|
|
.Xr screen 4 ,
|
|
|
|
.Xr splash 4 ,
|
|
|
|
.Xr syscons 4 ,
|
|
|
|
.Xr ukbd 4 ,
|
|
|
|
.Xr kbdmap 5 ,
|
|
|
|
.Xr rc.conf 5 ,
|
|
|
|
.Xr ttys 5 ,
|
|
|
|
.Xr config 8 ,
|
|
|
|
.Xr getty 8 ,
|
|
|
|
.Xr kbdmux 8 ,
|
|
|
|
.Xr kldload 8 ,
|
2014-10-20 14:48:20 +00:00
|
|
|
.Xr moused 8 ,
|
|
|
|
.Xr vtfontcvt 8
|
2014-06-27 18:24:20 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
2014-06-27 18:32:20 +00:00
|
|
|
.Nm
|
2014-06-27 18:24:20 +00:00
|
|
|
driver first appeared in
|
|
|
|
.Fx 9.3 .
|
2014-05-10 03:24:45 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An -nosplit
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
device driver was developed by
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Ed Schouten Aq Mt ed@FreeBSD.org ,
|
|
|
|
.An Ed Maste Aq Mt emaste@FreeBSD.org ,
|
2014-05-10 03:24:45 +00:00
|
|
|
and
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Aleksandr Rybalko Aq Mt ray@FreeBSD.org ,
|
2014-05-10 03:24:45 +00:00
|
|
|
with sponsorship provided by the
|
|
|
|
.Fx
|
|
|
|
Foundation.
|
|
|
|
This manual page was written by
|
2014-06-26 21:46:14 +00:00
|
|
|
.An Warren Block Aq Mt wblock@FreeBSD.org .
|
2014-05-10 03:24:45 +00:00
|
|
|
.Sh CAVEATS
|
|
|
|
Paste buffer size is limited by the system value
|
|
|
|
.Brq Dv MAX_INPUT ,
|
|
|
|
the number of bytes that can be stored in the terminal
|
|
|
|
input queue, usually 1024 bytes
|
|
|
|
(see
|
|
|
|
.Xr termios 4 ) .
|