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