1 .\" Copyright (c) 2014 Warren Block
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dt "VIRTUAL TERMINALS" 4
32 .Nd virtual terminal console driver
34 .Cd "options TERMINAL_KERN_ATTR=_attribute_"
35 .Cd "options TERMINAL_NORM_ATTR=_attribute_"
36 .Cd "options VT_MAXWINDOWS=N"
37 .Cd "options VT_ALT_TO_ESC_HACK=1"
38 .Cd "options VT_TWOBUTTON_MOUSE"
39 .Cd "options VT_FB_MAX_WIDTH=X"
40 .Cd "options VT_FB_MAX_HEIGHT=Y"
41 .Cd "options SC_NO_CUTPASTE"
48 .Cd kern.vt.fb.default_mode="<X>x<Y>"
49 .Cd kern.vt.fb.modes.<connector>="<X>x<Y>"
54 .Cd kern.vt.kbd_halt=1
55 .Cd kern.vt.kbd_poweroff=1
56 .Cd kern.vt.kbd_reboot=1
57 .Cd kern.vt.kbd_debug=1
58 .Cd kern.vt.kbd_panic=0
59 .Cd kern.vt.enable_bell=1
63 device provides multiple virtual terminals with an extensive feature
65 .Bl -item -offset indent
67 Unicode UTF-8 text with double-width characters.
69 Large font maps in graphics mode, including support for Asian
72 Graphics-mode consoles.
76 .Pq Kernel Mode Setting
77 video drivers for switching between the
79 and virtual terminals.
82 Multiple virtual terminals are provided on a single computer.
83 Up to sixteen virtual terminals can be defined.
84 A single virtual terminal is connected to the screen and keyboard
86 Key combinations are used to select a virtual terminal.
87 Alt-F1 through Alt-F12 correspond to the first twelve virtual terminals.
88 If more than twelve virtual terminals are created, Shift-Alt-F1 through
89 Shift-Alt-F4 are used to switch to the additional terminals.
90 .Ss Copying and Pasting Text with a Mouse
91 Copying and pasting text from the screen with a mouse is supported.
92 Press and hold down mouse button 1, usually the left button, while
93 moving the mouse to select text.
94 Selected text is highlighted with reversed foreground and background
96 To select more text after releasing mouse button 1, press mouse button
97 3, usually the right button.
98 To paste text that has been selected, press mouse button 2, usually the
100 The text is entered as if it were typed at the keyboard.
102 .Dv VT_TWOBUTTON_MOUSE
103 kernel option can be used with mice that only have two buttons.
104 Setting this option makes the second mouse button into the
108 for more information.
110 Output that has scrolled off the screen can be reviewed by pressing the
111 Scroll Lock key, then scrolling up and down with the arrow keys.
112 The Page Up and Page Down keys scroll up or down a full screen at a
114 The Home and End keys jump to the beginning or end of the scrollback
116 When finished reviewing, press the Scroll Lock key again to return to
118 .Sh DRIVER CONFIGURATION
119 .Ss Kernel Configuration Options
120 These kernel options control the
123 .Bl -tag -width MAXCONS
124 .It Dv TERMINAL_NORM_ATTR= Ns Pa attribute
125 .It Dv TERMINAL_KERN_ATTR= Ns Pa attribute
126 These options change the default colors used for normal and kernel
128 Available colors are defined in
133 .It Dv VT_MAXWINDOWS=N
134 Set the number of virtual terminals to be created to
136 The value defaults to 12.
137 .It Dv VT_ALT_TO_ESC_HACK=1
138 When the Alt key is held down while pressing another key, send an ESC
139 sequence instead of the Alt key.
140 .It Dv VT_TWOBUTTON_MOUSE
141 If defined, swap the functions of mouse buttons 2 and 3.
142 In effect, this makes the right-hand mouse button perform a paste.
143 These options are checked in the order shown.
144 .It Dv SC_NO_CUTPASTE
145 Disable mouse support.
146 .It VT_FB_DEFAULT_WIDTH=X
147 Set the default width to
149 .It VT_FB_DEFAULT_HEIGHT=Y
150 Set the default height to
153 .Sh BACKWARDS COMPATIBILITY
154 Several options are provided for compatibility with the previous
157 These options will be removed in a future
160 .Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE"
161 .It Sy vt Option Name Ta Sy sc Option Name
162 .It Dv TERMINAL_KERN_ATTR Ta Dv SC_KERNEL_CONS_ATTR
163 .It Dv TERMINAL_NORM_ATTR Ta Dv SC_NORM_ATTR
164 .It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE
165 .It Dv VT_MAXWINDOWS Ta Dv MAXCONS
166 .It none Ta Dv SC_NO_CUTPASTE
168 .Sh START-UP OPERATION WITH X86 BIOS SYSTEMS
169 The computer BIOS starts in text mode, and
173 runs, loading the kernel.
176 is set, the system remains in text mode.
179 switches to 640x480x16 VGA mode using
182 .Pq Kernel Mode Setting
183 video driver is available, the display is switched to high resolution
184 and the KMS driver takes over.
185 When a KMS driver is not available,
189 These settings can be entered at the
193 .Bl -tag -width indent
194 .It Va hw.vga.textmode
195 Set to 1 to use virtual terminals in text mode instead of graphics mode.
196 Features that require graphics mode, like loadable fonts, will be
203 to override the default driver used for the system console.
206 is used on computers that boot from BIOS, and
208 is used on computers that boot from UEFI.
209 .It Va kern.vt.fb.default_mode
210 Set this value to a graphic mode to override the default mode picked by the
213 The mode is applied to all output connectors.
214 This is currently only supported by the
216 backend when it is paired with a KMS video driver.
217 .It Va kern.vt.fb.modes. Ns Pa connector_name
218 Set this value to a graphic mode to override the default mode picked by the
221 This mode is applied to the output connector
224 It has precedence over
225 .Va kern.vt.fb.default_mode .
226 The names of available connector names can be found in
228 after loading the KMS driver.
229 It will contain a list of connectors and their associated tunables.
230 This is currently only supported by the
232 backend when it is paired with a KMS video driver.
234 .Sh KEYBOARD SYSCTL TUNABLES
235 These settings control whether certain special key combinations are enabled or
237 The specific key combinations can be configured by using a
241 These settings can be entered at the
245 and can also be changed at runtime with the
248 .Bl -tag -width indent
249 .It Va kern.vt.kbd_halt
250 Enable halt keyboard combination.
251 .It Va kern.vt.kbd_poweroff
252 Enable power off key combination.
253 .It Va kern.vt.kbd_reboot.
254 Enable reboot key combination, usually Ctrl+Alt+Del.
255 .It Va kern.vt.kbd_debug
256 Enable debug request key combination, usually Ctrl+Alt+Esc.
257 .It Va kern.vt.kbd_panic
258 Enable panic key combination.
260 .Sh OTHER SYSCTL TUNABLES
261 These settings can be entered at the
265 or changed at runtime with
267 .Bl -tag -width indent
268 .It Va kern.vt.enable_bell
269 Enable the terminal bell.
272 .Bl -tag -width /usr/share/vt/keymaps/* -compact
274 .It Pa /dev/consolectl
278 terminal initialization information
279 .It Pa /usr/share/vt/fonts/*.fnt
281 .It Pa /usr/share/vt/keymaps/*.kbd
285 This example changes the default color of normal text to green on a
286 black background, or black on a green background when reversed.
287 Note that white space cannot be used inside the attribute string
288 because of the current implementation of
291 .Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)"
293 This line changes the default color of kernel messages to be bright red
294 on a black background, or black on a bright red background when reversed.
296 .Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)"
298 To set a 1024x768 mode on all output connectors, put the following line in
299 .Pa /boot/loader.conf :
301 .Dl kern.vt.fb.default_mode="1024x768"
303 To set a 800x600 only on a laptop builtin screen, use the following line instead:
305 .Dl kern.vt.fb.modes.LVDS-1="800x600"
307 The connector name was found in
310 .Dl info: [drm] Connector LVDS-1: get mode from tunables:
311 .Dl info: [drm] - kern.vt.fb.modes.LVDS-1
312 .Dl info: [drm] - kern.vt.fb.default_mode
336 driver first appeared in
342 device driver was developed by
343 .An Ed Schouten Aq ed@FreeBSD.org ,
344 .An Ed Maste Aq emaste@FreeBSD.org ,
346 .An Aleksandr Rybalko Aq ray@FreeBSD.org ,
347 with sponsorship provided by the
350 This manual page was written by
351 .An Warren Block <wblock@FreeBSD.org>.
353 Paste buffer size is limited by the system value
355 the number of bytes that can be stored in the terminal
356 input queue, usually 1024 bytes