]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/vt.4
Minor mdoc fix.
[FreeBSD/FreeBSD.git] / share / man / man4 / vt.4
1 .\" Copyright (c) 2014 Warren Block
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
12 .\"
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
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd June 27, 2014
28 .Dt "VIRTUAL TERMINALS" 4
29 .Os
30 .Sh NAME
31 .Nm vt
32 .Nd virtual terminal console driver
33 .Sh SYNOPSIS
34 .Cd "options VT_MAXWINDOWS=N"
35 .Cd "options VT_ALT_TO_ESC_HACK=1"
36 .Cd "options VT_TWOBUTTON_MOUSE"
37 .Cd "options VT_FB_DEFAULT_WIDTH=X"
38 .Cd "options VT_FB_DEFAULT_HEIGHT=Y"
39 .Cd "options SC_NO_CUTPASTE"
40 .Cd "device vt"
41 .Pp
42 In
43 .Xr loader.conf 5 :
44 .Cd hw.vga.textmode=1
45 .Cd kern.vty=vt
46 .Sh DESCRIPTION
47 The
48 .Nm
49 device provides multiple virtual terminals with an extensive feature
50 set:
51 .Bl -item -offset indent
52 .It
53 Unicode UTF-8 text with double-width characters.
54 .It
55 Large font maps in graphics mode, including support for Asian
56 character sets.
57 .It
58 Graphics-mode consoles.
59 .It
60 Integration with
61 KMS
62 .Pq Kernel Mode Setting
63 video drivers for switching between the
64 .Em X Window System
65 and virtual terminals.
66 .El
67 .Ss Virtual Terminals
68 Multiple virtual terminals are provided on a single computer.
69 Up to sixteen virtual terminals can be defined.
70 A single virtual terminal is connected to the screen and keyboard
71 at a time.
72 Key combinations are used to select a virtual terminal.
73 Alt-F1 through Alt-F12 correspond to the first twelve virtual terminals.
74 If more than twelve virtual terminals are created, Shift-Alt-F1 through
75 Shift-Alt-F4 are used to switch to the additional terminals.
76 .Ss Copying and Pasting Text with a Mouse
77 Copying and pasting text from the screen with a mouse is supported.
78 Press and hold down mouse button 1, usually the left button, while
79 moving the mouse to select text.
80 Selected text is highlighted with reversed foreground and background
81 colors.
82 To select more text after releasing mouse button 1, press mouse button
83 3, usually the right button.
84 To paste text that has been selected, press mouse button 2, usually the
85 middle button.
86 The text is entered as if it were typed at the keyboard.
87 The
88 .Dv VT_TWOBUTTON_MOUSE
89 kernel option can be used with mice that only have two buttons.
90 Setting this option makes the second mouse button into the
91 paste button.
92 See
93 .Xr moused 8
94 for more information.
95 .Ss Scrolling Back
96 Output that has scrolled off the screen can be reviewed by pressing the
97 Scroll Lock key, then scrolling up and down with the arrow keys.
98 The Page Up and Page Down keys scroll up or down a full screen at a
99 time.
100 The Home and End keys jump to the beginning or end of the scrollback
101 buffer.
102 When finished reviewing, press the Scroll Lock key again to return to
103 normal use.
104 .Sh DRIVER CONFIGURATION
105 .Ss Kernel Configuration Options
106 These kernel options control the
107 .Nm
108 driver.
109 .Bl -tag -width MAXCONS
110 .It Dv VT_MAXWINDOWS=N
111 Set the number of virtual terminals to be created to
112 .Fa N .
113 The value defaults to 12.
114 .It Dv VT_ALT_TO_ESC_HACK=1
115 When the Alt key is held down while pressing another key, send an ESC
116 sequence instead of the Alt key.
117 .It Dv VT_TWOBUTTON_MOUSE
118 If defined, swap the functions of mouse buttons 2 and 3.
119 In effect, this makes the right-hand mouse button perform a paste.
120 These options are checked in the order shown.
121 .It Dv SC_NO_CUTPASTE
122 Disable mouse support.
123 .It VT_FB_DEFAULT_WIDTH=X
124 Set the default width to
125 .Fa X .
126 .It VT_FB_DEFAULT_HEIGHT=Y
127 Set the default height to
128 .Fa Y .
129 .El
130 .Sh BACKWARDS COMPATIBILITY
131 Several options are provided for compatibility with the previous
132 console device,
133 .Xr sc 4 .
134 These options will be removed in a future
135 .Fx
136 version.
137 .Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE"
138 .It Sy vt Option Name Ta Sy sc Option Name
139 .It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE
140 .It Dv VT_MAXWINDOWS Ta Dv MAXCONS
141 .It none Ta Dv SC_NO_CUTPASTE
142 .El
143 .Sh START-UP OPERATION WITH X86 BIOS SYSTEMS
144 The computer BIOS starts in text mode, and
145 the
146 .Fx
147 .Xr loader 8
148 runs, loading the kernel.
149 If
150 .Va hw.vga.textmode
151 is set, the system remains in text mode.
152 Otherwise,
153 .Nm
154 switches to 640x480x16 VGA mode using
155 .Xr vt_vga 4 .
156 If a KMS
157 .Pq Kernel Mode Switching
158 video driver is available, the display is switched to high resolution
159 and the KMS driver takes over.
160 When a KMS driver is not available,
161 .Xr vt_vga 4
162 remains active.
163 .Sh LOADER TUNABLES
164 These settings can be entered at the
165 .Xr loader 8
166 prompt or in
167 .Xr loader.conf 5 .
168 .Bl -tag -width indent
169 .It Va hw.vga.textmode
170 Set to 1 to use virtual terminals in text mode instead of graphics mode.
171 Features that require graphics mode, like loadable fonts, will be
172 disabled.
173 .It Va kern.vty
174 Set to vt to choose the
175 .Nm
176 driver for the system console, if the
177 .Xr syscons 4
178 driver is also compiled in and is the default.
179 .El
180 .Sh FILES
181 .Bl -tag -width /usr/share/syscons/keymaps/* -compact
182 .It Pa /dev/console
183 .It Pa /dev/consolectl
184 .It Pa /dev/ttyv*
185 virtual terminals
186 .It Pa /etc/ttys
187 terminal initialization information
188 .El
189 .Sh SEE ALSO
190 .Xr kbdcontrol 1 ,
191 .Xr login 1 ,
192 .Xr vidcontrol 1 ,
193 .Xr atkbd 4 ,
194 .Xr atkbdc 4 ,
195 .Xr keyboard 4 ,
196 .Xr screen 4 ,
197 .Xr splash 4 ,
198 .Xr syscons 4 ,
199 .Xr ukbd 4 ,
200 .Xr vga 4 ,
201 .Xr kbdmap 5 ,
202 .Xr rc.conf 5 ,
203 .Xr ttys 5 ,
204 .Xr config 8 ,
205 .Xr getty 8 ,
206 .Xr kbdmux 8 ,
207 .Xr kldload 8 ,
208 .Xr moused 8
209 .Sh HISTORY
210 The
211 .Nm
212 driver first appeared in
213 .Fx 9.3 .
214 .Sh AUTHORS
215 .An -nosplit
216 The
217 .Nm
218 device driver was developed by
219 .An Ed Schouten Aq Mt ed@FreeBSD.org ,
220 .An Ed Maste Aq Mt emaste@FreeBSD.org ,
221 and
222 .An Aleksandr Rybalko Aq Mt ray@FreeBSD.org ,
223 with sponsorship provided by the
224 .Fx
225 Foundation.
226 This manual page was written by
227 .An Warren Block Aq Mt wblock@FreeBSD.org .
228 .Sh CAVEATS
229 Paste buffer size is limited by the system value
230 .Brq Dv MAX_INPUT ,
231 the number of bytes that can be stored in the terminal
232 input queue, usually 1024 bytes
233 (see
234 .Xr termios 4 ) .