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