1abebc22fSWarren Block.\" Copyright (c) 2014 Warren Block 2abebc22fSWarren Block.\" All rights reserved. 3abebc22fSWarren Block.\" 4abebc22fSWarren Block.\" Redistribution and use in source and binary forms, with or without 5abebc22fSWarren Block.\" modification, are permitted provided that the following conditions 6abebc22fSWarren Block.\" are met: 7abebc22fSWarren Block.\" 1. Redistributions of source code must retain the above copyright 8abebc22fSWarren Block.\" notice, this list of conditions and the following disclaimer. 9abebc22fSWarren Block.\" 2. Redistributions in binary form must reproduce the above copyright 10abebc22fSWarren Block.\" notice, this list of conditions and the following disclaimer in the 11abebc22fSWarren Block.\" documentation and/or other materials provided with the distribution. 12abebc22fSWarren Block.\" 13abebc22fSWarren Block.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14abebc22fSWarren Block.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15abebc22fSWarren Block.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16abebc22fSWarren Block.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17abebc22fSWarren Block.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18abebc22fSWarren Block.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19abebc22fSWarren Block.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20abebc22fSWarren Block.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21abebc22fSWarren Block.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22abebc22fSWarren Block.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23abebc22fSWarren Block.\" SUCH DAMAGE. 24abebc22fSWarren Block.\" 25abebc22fSWarren Block.\" $FreeBSD$ 26abebc22fSWarren Block.\" 278329214dSWarren Block.Dd July 2, 2014 283bff5e84SWarren Block.Dt "VIRTUAL TERMINALS" 4 29abebc22fSWarren Block.Os 30abebc22fSWarren Block.Sh NAME 31abebc22fSWarren Block.Nm vt 32abebc22fSWarren Block.Nd virtual terminal console driver 33abebc22fSWarren Block.Sh SYNOPSIS 347344ee18SMarius Strobl.Cd "options TERMINAL_KERN_ATTR=_attribute_" 357344ee18SMarius Strobl.Cd "options TERMINAL_NORM_ATTR=_attribute_" 36abebc22fSWarren Block.Cd "options VT_MAXWINDOWS=N" 37abebc22fSWarren Block.Cd "options VT_ALT_TO_ESC_HACK=1" 38abebc22fSWarren Block.Cd "options VT_TWOBUTTON_MOUSE" 39abebc22fSWarren Block.Cd "options VT_FB_DEFAULT_WIDTH=X" 40abebc22fSWarren Block.Cd "options VT_FB_DEFAULT_HEIGHT=Y" 41abebc22fSWarren Block.Cd "options SC_NO_CUTPASTE" 42abebc22fSWarren Block.Cd "device vt" 43abebc22fSWarren Block.Pp 44abebc22fSWarren BlockIn 45abebc22fSWarren Block.Xr loader.conf 5 : 46abebc22fSWarren Block.Cd hw.vga.textmode=1 4759644098SEd Maste.Cd kern.vty=vt 4845dc3700SAleksandr Rybalko.Cd kern.vt.spclkeys=15 49abebc22fSWarren Block.Sh DESCRIPTION 50abebc22fSWarren BlockThe 51abebc22fSWarren Block.Nm 52abebc22fSWarren Blockdevice provides multiple virtual terminals with an extensive feature 53abebc22fSWarren Blockset: 54abebc22fSWarren Block.Bl -item -offset indent 55abebc22fSWarren Block.It 56abebc22fSWarren BlockUnicode UTF-8 text with double-width characters. 57abebc22fSWarren Block.It 58abebc22fSWarren BlockLarge font maps in graphics mode, including support for Asian 59abebc22fSWarren Blockcharacter sets. 60abebc22fSWarren Block.It 61abebc22fSWarren BlockGraphics-mode consoles. 62abebc22fSWarren Block.It 63abebc22fSWarren BlockIntegration with 64abebc22fSWarren BlockKMS 65abebc22fSWarren Block.Pq Kernel Mode Setting 66abebc22fSWarren Blockvideo drivers for switching between the 67abebc22fSWarren Block.Em X Window System 68abebc22fSWarren Blockand virtual terminals. 69abebc22fSWarren Block.El 70abebc22fSWarren Block.Ss Virtual Terminals 71abebc22fSWarren BlockMultiple virtual terminals are provided on a single computer. 72abebc22fSWarren BlockUp to sixteen virtual terminals can be defined. 73abebc22fSWarren BlockA single virtual terminal is connected to the screen and keyboard 74abebc22fSWarren Blockat a time. 75abebc22fSWarren BlockKey combinations are used to select a virtual terminal. 76abebc22fSWarren BlockAlt-F1 through Alt-F12 correspond to the first twelve virtual terminals. 77abebc22fSWarren BlockIf more than twelve virtual terminals are created, Shift-Alt-F1 through 78abebc22fSWarren BlockShift-Alt-F4 are used to switch to the additional terminals. 79abebc22fSWarren Block.Ss Copying and Pasting Text with a Mouse 80abebc22fSWarren BlockCopying and pasting text from the screen with a mouse is supported. 81abebc22fSWarren BlockPress and hold down mouse button 1, usually the left button, while 82abebc22fSWarren Blockmoving the mouse to select text. 83abebc22fSWarren BlockSelected text is highlighted with reversed foreground and background 84abebc22fSWarren Blockcolors. 85abebc22fSWarren BlockTo select more text after releasing mouse button 1, press mouse button 86abebc22fSWarren Block3, usually the right button. 87abebc22fSWarren BlockTo paste text that has been selected, press mouse button 2, usually the 88abebc22fSWarren Blockmiddle button. 89abebc22fSWarren BlockThe text is entered as if it were typed at the keyboard. 90abebc22fSWarren BlockThe 91abebc22fSWarren Block.Dv VT_TWOBUTTON_MOUSE 92abebc22fSWarren Blockkernel option can be used with mice that only have two buttons. 93abebc22fSWarren BlockSetting this option makes the second mouse button into the 94abebc22fSWarren Blockpaste button. 95abebc22fSWarren BlockSee 96abebc22fSWarren Block.Xr moused 8 97abebc22fSWarren Blockfor more information. 98abebc22fSWarren Block.Ss Scrolling Back 99abebc22fSWarren BlockOutput that has scrolled off the screen can be reviewed by pressing the 100abebc22fSWarren BlockScroll Lock key, then scrolling up and down with the arrow keys. 101abebc22fSWarren BlockThe Page Up and Page Down keys scroll up or down a full screen at a 102abebc22fSWarren Blocktime. 103abebc22fSWarren BlockThe Home and End keys jump to the beginning or end of the scrollback 104abebc22fSWarren Blockbuffer. 105abebc22fSWarren BlockWhen finished reviewing, press the Scroll Lock key again to return to 106abebc22fSWarren Blocknormal use. 107abebc22fSWarren Block.Sh DRIVER CONFIGURATION 108abebc22fSWarren Block.Ss Kernel Configuration Options 109abebc22fSWarren BlockThese kernel options control the 110abebc22fSWarren Block.Nm 111abebc22fSWarren Blockdriver. 112abebc22fSWarren Block.Bl -tag -width MAXCONS 1138329214dSWarren Block.It Dv TERMINAL_NORM_ATTR= Ns Pa attribute 1148329214dSWarren Block.It Dv TERMINAL_KERN_ATTR= Ns Pa attribute 1158329214dSWarren BlockThese options allow changing the default colors used for normal and kernel 1168329214dSWarren Blocktext. 1177344ee18SMarius StroblAvailable colors are defined in 1187344ee18SMarius Strobl.In sys/terminal.h . 1197344ee18SMarius StroblSee 1207344ee18SMarius Strobl.Sx EXAMPLES 1217344ee18SMarius Stroblbelow. 122abebc22fSWarren Block.It Dv VT_MAXWINDOWS=N 123abebc22fSWarren BlockSet the number of virtual terminals to be created to 124abebc22fSWarren Block.Fa N . 125abebc22fSWarren BlockThe value defaults to 12. 126abebc22fSWarren Block.It Dv VT_ALT_TO_ESC_HACK=1 127abebc22fSWarren BlockWhen the Alt key is held down while pressing another key, send an ESC 128abebc22fSWarren Blocksequence instead of the Alt key. 129abebc22fSWarren Block.It Dv VT_TWOBUTTON_MOUSE 130abebc22fSWarren BlockIf defined, swap the functions of mouse buttons 2 and 3. 131abebc22fSWarren BlockIn effect, this makes the right-hand mouse button perform a paste. 132abebc22fSWarren BlockThese options are checked in the order shown. 133abebc22fSWarren Block.It Dv SC_NO_CUTPASTE 134abebc22fSWarren BlockDisable mouse support. 135abebc22fSWarren Block.It VT_FB_DEFAULT_WIDTH=X 136abebc22fSWarren BlockSet the default width to 137abebc22fSWarren Block.Fa X . 138abebc22fSWarren Block.It VT_FB_DEFAULT_HEIGHT=Y 139abebc22fSWarren BlockSet the default height to 140abebc22fSWarren Block.Fa Y . 141abebc22fSWarren Block.El 142abebc22fSWarren Block.Sh BACKWARDS COMPATIBILITY 143abebc22fSWarren BlockSeveral options are provided for compatibility with the previous 144abebc22fSWarren Blockconsole device, 145abebc22fSWarren Block.Xr sc 4 . 146abebc22fSWarren BlockThese options will be removed in a future 147abebc22fSWarren Block.Fx 148abebc22fSWarren Blockversion. 149abebc22fSWarren Block.Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE" 150abebc22fSWarren Block.It Sy vt Option Name Ta Sy sc Option Name 1517344ee18SMarius Strobl.It Dv TERMINAL_KERN_ATTR Ta Dv SC_KERNEL_CONS_ATTR 1527344ee18SMarius Strobl.It Dv TERMINAL_NORM_ATTR Ta Dv SC_NORM_ATTR 153abebc22fSWarren Block.It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE 154abebc22fSWarren Block.It Dv VT_MAXWINDOWS Ta Dv MAXCONS 155abebc22fSWarren Block.It none Ta Dv SC_NO_CUTPASTE 156abebc22fSWarren Block.El 157abebc22fSWarren Block.Sh START-UP OPERATION WITH X86 BIOS SYSTEMS 158abebc22fSWarren BlockThe computer BIOS starts in text mode, and 159abebc22fSWarren Blockthe 160abebc22fSWarren Block.Fx 161abebc22fSWarren Block.Xr loader 8 162abebc22fSWarren Blockruns, loading the kernel. 163abebc22fSWarren BlockIf 164abebc22fSWarren Block.Va hw.vga.textmode 165abebc22fSWarren Blockis set, the system remains in text mode. 166abebc22fSWarren BlockOtherwise, 167abebc22fSWarren Block.Nm 168abebc22fSWarren Blockswitches to 640x480x16 VGA mode using 1698329214dSWarren Block.Cm vt_vga . 170abebc22fSWarren BlockIf a KMS 171abebc22fSWarren Block.Pq Kernel Mode Switching 172abebc22fSWarren Blockvideo driver is available, the display is switched to high resolution 173abebc22fSWarren Blockand the KMS driver takes over. 174abebc22fSWarren BlockWhen a KMS driver is not available, 1758329214dSWarren Block.Cm vt_vga 176abebc22fSWarren Blockremains active. 177abebc22fSWarren Block.Sh LOADER TUNABLES 178abebc22fSWarren BlockThese settings can be entered at the 179abebc22fSWarren Block.Xr loader 8 180abebc22fSWarren Blockprompt or in 181abebc22fSWarren Block.Xr loader.conf 5 . 182abebc22fSWarren Block.Bl -tag -width indent 183abebc22fSWarren Block.It Va hw.vga.textmode 184abebc22fSWarren BlockSet to 1 to use virtual terminals in text mode instead of graphics mode. 185abebc22fSWarren BlockFeatures that require graphics mode, like loadable fonts, will be 186abebc22fSWarren Blockdisabled. 18759644098SEd Maste.It Va kern.vty 1888329214dSWarren BlockWhen both 18959644098SEd Maste.Nm 1908329214dSWarren Blockand 1918329214dSWarren Block.Xr sc 4 have been compiled into the kernel, the one to use for the 1928329214dSWarren Blocksystem console can be selected by setting this value to 1938329214dSWarren Block.Ql vt 1948329214dSWarren Blockor 1958329214dSWarren Block.Ql sc . 1968329214dSWarren BlockIf this value is not set, 1978329214dSWarren Block.Xr sc 4 1988329214dSWarren Blockis used. 19945dc3700SAleksandr Rybalko.It Va kern.vt.spclkeys 20045dc3700SAleksandr Rybalkobitmap of allowed special keys. 1 is enabled, 0 is disabled. Encoded as: 20145dc3700SAleksandr Rybalko.Bl -tag -compact -width 0x000000 20245dc3700SAleksandr Rybalko.It 0x0001 20345dc3700SAleksandr RybalkoDebug request key combination. (Ctrl+Alt+Esc) 20445dc3700SAleksandr Rybalko.It 0x0002 20545dc3700SAleksandr RybalkoReboot. (Ctrl+Alt+Del) 20645dc3700SAleksandr Rybalko.It 0x0004 20745dc3700SAleksandr RybalkoHalt. 20845dc3700SAleksandr Rybalko.It 0x0008 20945dc3700SAleksandr RybalkoPower down. 21045dc3700SAleksandr Rybalko.El 21145dc3700SAleksandr RybalkoDefault is 15, all enabled. 212abebc22fSWarren Block.El 213abebc22fSWarren Block.Sh FILES 214*651045d6SStefan Eßer.Bl -tag -width /usr/share/vt/keymaps/* -compact 215abebc22fSWarren Block.It Pa /dev/console 216abebc22fSWarren Block.It Pa /dev/consolectl 217abebc22fSWarren Block.It Pa /dev/ttyv* 218abebc22fSWarren Blockvirtual terminals 219abebc22fSWarren Block.It Pa /etc/ttys 220abebc22fSWarren Blockterminal initialization information 221*651045d6SStefan Eßer.It Pa /usr/share/vt/fonts/*.fnt 222*651045d6SStefan Eßerconsole fonts 223*651045d6SStefan Eßer.It Pa /usr/share/vt/keymaps/*.kbd 224*651045d6SStefan Eßerkeyboard layouts 225abebc22fSWarren Block.El 2268329214dSWarren Block.Sh EXAMPLES 2278329214dSWarren BlockThis example changes the default color of normal text to green on a 2288329214dSWarren Blockblack background, or black on a green background when reversed. 2298329214dSWarren BlockNote that white space cannot be used inside the attribute string 2308329214dSWarren Blockbecause of the current implementation of 2318329214dSWarren Block.Xr config 8 . 2328329214dSWarren Block.Pp 2338329214dSWarren Block.Dl "options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)" 2348329214dSWarren Block.Pp 2358329214dSWarren BlockThis line changes the default color of kernel messages to be bright red 2368329214dSWarren Blockon a black background, or black on a bright red background when reversed. 2378329214dSWarren Block.Pp 2388329214dSWarren Block.Dl "options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK)" 239abebc22fSWarren Block.Sh SEE ALSO 240abebc22fSWarren Block.Xr kbdcontrol 1 , 241abebc22fSWarren Block.Xr login 1 , 242abebc22fSWarren Block.Xr vidcontrol 1 , 243abebc22fSWarren Block.Xr atkbd 4 , 244abebc22fSWarren Block.Xr atkbdc 4 , 245abebc22fSWarren Block.Xr keyboard 4 , 246abebc22fSWarren Block.Xr screen 4 , 247abebc22fSWarren Block.Xr splash 4 , 248abebc22fSWarren Block.Xr syscons 4 , 249abebc22fSWarren Block.Xr ukbd 4 , 250abebc22fSWarren Block.Xr kbdmap 5 , 251abebc22fSWarren Block.Xr rc.conf 5 , 252abebc22fSWarren Block.Xr ttys 5 , 253abebc22fSWarren Block.Xr config 8 , 254abebc22fSWarren Block.Xr getty 8 , 255abebc22fSWarren Block.Xr kbdmux 8 , 256abebc22fSWarren Block.Xr kldload 8 , 257abebc22fSWarren Block.Xr moused 8 258a102d822SMarius Strobl.Sh HISTORY 259a102d822SMarius StroblThe 2603a8794beSJoel Dahl.Nm 261a102d822SMarius Strobldriver first appeared in 262a102d822SMarius Strobl.Fx 9.3 . 263abebc22fSWarren Block.Sh AUTHORS 264abebc22fSWarren Block.An -nosplit 265abebc22fSWarren BlockThe 266abebc22fSWarren Block.Nm 267abebc22fSWarren Blockdevice driver was developed by 2686c899950SBaptiste Daroussin.An Ed Schouten Aq Mt ed@FreeBSD.org , 2696c899950SBaptiste Daroussin.An Ed Maste Aq Mt emaste@FreeBSD.org , 270abebc22fSWarren Blockand 2716c899950SBaptiste Daroussin.An Aleksandr Rybalko Aq Mt ray@FreeBSD.org , 272abebc22fSWarren Blockwith sponsorship provided by the 273abebc22fSWarren Block.Fx 274abebc22fSWarren BlockFoundation. 275abebc22fSWarren BlockThis manual page was written by 2766c899950SBaptiste Daroussin.An Warren Block Aq Mt wblock@FreeBSD.org . 277abebc22fSWarren Block.Sh CAVEATS 278abebc22fSWarren BlockPaste buffer size is limited by the system value 279abebc22fSWarren Block.Brq Dv MAX_INPUT , 280abebc22fSWarren Blockthe number of bytes that can be stored in the terminal 281abebc22fSWarren Blockinput queue, usually 1024 bytes 282abebc22fSWarren Block(see 283abebc22fSWarren Block.Xr termios 4 ) . 284