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