VIDCONTROL(1)
π vidcontrol(1) β General Commands Manual β system video console control and configuration utility
β¨ NAME β¨
Okay so vidcontrol is the system video console control and configuration utility, bestie. That's the whole vibe: it bosses your console around. π
π SYNOPSIS π
vidcontrol [-CdHLPpx] [-b color] [-c appearance] [-E emulator] [-f
[[size] file]] [-g geometry] [-h size]
[-i active | adapter | mode] [-l screen_map] [-M char]
[-m on | off] [-r foreground background] [-S on | off]
[-s number] [-T xterm | cons25] [-t N | off] [mode]
[foreground [background]] [show]
π¦ DESCRIPTION π¦
The vidcontrol utility is used to set various options for the syscons(4) or vt(4) console driver, such as video mode, colors, cursor shape, screen output map, font, and screen saver timeout. Only a small subset of options is supported by vt(4). Unsupported options lead to error messages, typically including the text βInappropriate ioctl for deviceβ. π
The following command line options are supported:
modeβ Select a new video mode. The modes currently recognized are:80x25,80x30,80x43,80x50,80x60,132x25,132x30,132x43,132x50,132x60,VGA_40x25,VGA_80x25,VGA_80x30,VGA_80x50,VGA_80x60,VGA_90x25,VGA_90x30,VGA_90x43,VGA_90x50,VGA_90x60,EGA_80x25,EGA_80x43,VESA_132x25,VESA_132x43,VESA_132x50,VESA_132x60. The raster text modeVESA_800x600can also be chosen. Alternatively, a mode can be specified with its number by using a mode name of the formMODE_β¨NUMBERβ©. A list of valid mode numbers can be obtained with the-i modeoption. See βVideo Mode Supportβ below. πforeground [background]β Change colors when displaying text. Specify the foreground color (e.g.,vidcontrol white), or both a foreground and background colors (e.g.,vidcontrol yellow blue). Use theshowcommand below to see available colors. π¨showβ See the supported colors on a given platform.-b colorβ Set border color tocolor. This option may not be always supported by the video driver.-Cβ Clear the history buffer.-c setting[,setting ...]β Change the cursor appearance. The change is specified by a non-empty comma-separated list of settings. Each setting overrides or modifies previous ones in left to right order.
The following override settings are available:
normalβ Set to a block covering 1 character cell, with a configuration-dependent coloring that should be at worst inverse video.destructiveβ Set to a blinking sub-block withheightscanlines starting atbase. The name βdestructiveβ is bad for backwards compatibility. This setting should not force destructiveness, and it now only gives destructiveness in some configurations (typically for hardware cursors in text mode). Blinking limits destructiveness. This setting should now be spellednormal,blink,noblock. A non-blinking destructive cursor would be unusable, so old versions ofvidcontroldid not support it, and this version does not have an override for it.base=value,height=valueβ Set the specified scanline parameters. These parameters are only active innoblockmode.valueis an integer in any base supported bystrtol(3). Settingheightto0turns off the cursor innoblockmode. Negative values are silently ignored. Positive values are clamped to fit in the character cell when the cursor is drawn.
The following modifier settings are available:
blink,noblinkβ Set or clear the blinking attribute. This is not quite backwards compatible. In old versions ofvidcontrol,blinkwas an override to a blinking block.block,noblockβ Set or clear the block attribute. This attribute is the inverse of the flagCONS_CHAR_CURSORin the implementation. It deactivates the scanline parameters, and expresses a preference for using a simpler method of implementation. Its inverse does the opposite. When the scanline parameters give a full block, this attribute reduces to a method selection bit. The block method tends to give better coloring.hidden,nohiddenβ Set or clear the hidden attribute.
The following (non-sticky) flags control application of the settings:
charcolorsβ Applybaseandheightto the (character) cursor's list of preferred colors instead of its shape. Beware that the color numbers are raw VGA palette indexes, not ANSI color numbers. The indexes are reduced mod 8, 16 or 256, or ignored, depending on the video mode and renderer.mousecolorsβ Colors for the mouse cursor in graphics mode. Likecharcolors, except there is no preference or sequence;basegives the mouse border color andheightgives the mouse interior color. Together withcharcolors, this gives 2 selection bits which select between only 3 of 4 sub-destinations of the 4 destinations selected bydefaultandlocal(by ignoringmousecolorsifcharcolorsis also set).defaultβ Apply the changes to the default settings and then to the active settings, instead of only to the active settings. Together withlocal, this gives 2 selection bits which select between 4 destinations.shapeonlyβ Ignore any changes to theblockandhiddenattributes.localβ Apply the changes to the current vty. The default is to apply them to a global place and copy from there to all vtys.resetβ Reset everything. The default is to not reset. When thelocalparameter is specified, the current local settings are reset to default local settings. Otherwise, the current global settings are reset to default global settings and then copied to the current and default settings for all vtys.showβ Show the current changes.
-dβ Print out current output screen map. Supported only withsyscons(4).-E emulatorβ Set the terminal emulator toemulator. Supported only withsyscons(4).-eβ Show the active and available terminal emulators. Supported only withsyscons(4).-f [[size] file]β Load font file forsize(currently, only8x8,8x14or8x16). The font file can be either uuencoded or in raw binary format. You can also use the menu-drivenvidfont(1)command to load the font of your choice.
Size may be omitted, in this case vidcontrol will try to guess it from the size of font file.
When using vt(4) both size and file can be omitted, and the default font will be loaded.
Note that older video cards, such as MDA and CGA, do not support software font. See also βVideo Mode Supportβ and βEXAMPLESβ below and the man page for either syscons(4) or vt(4) (depending on which driver you use). π§
-g geometryβ Set the geometry of the text mode for the modes with selectable geometry. Currently only raster modes, such asVESA_800x600, support this option. See also βVideo Mode Supportβ and βEXAMPLESβ below.-h sizeβ Set the size of the history (scrollback) buffer tosizelines.-i activeβ Shows the active vty number.-i adapterβ Shows info about the current video adapter.-i modeβ Shows the possible video modes with the current video hardware.-l screen_mapβ Install screen output map file fromscreen_map. Supported only withsyscons(4).-Lβ Install default screen output map. Supported only withsyscons(4).-M charβ Sets the base character used to render the mouse pointer tochar.-m on | offβ Switch the mouse pointer on or off. Used together with themoused(8)daemon for text mode cut & paste functionality.-pβ Capture the current contents of the video buffer corresponding to the terminal device referred to by standard input. Thevidcontrolutility writes contents of the video buffer to the standard output in a raw binary format. For details about that format see βFormat of Video Buffer Dumpβ below. Supported only withsyscons(4).-Pβ Same as-p, but dump contents of the video buffer in a plain text format ignoring nonprintable characters and information about text attributes. Supported only withsyscons(4).-Hβ When used with-por-P, it instructsvidcontrolto dump full history buffer instead of visible portion of the video buffer only.-r foreground backgroundβ Change reverse mode colors toforegroundandbackground.-S on | offβ Turn vty switching on or off. When vty switching is off, attempts to switch to a different virtual terminal will fail. (The default is to permit vty switching.) This protection can be easily bypassed when the kernel is compiled with theDDBoption. However, you probably should not compile the kernel debugger on a box which is supposed to be physically secure. π-s numberβ Set the active vty tonumber.-T xterm | cons25β Switch betweenxtermandcons25style terminal emulation.-t N | offβ Set the screensaver timeout toNseconds, or turns it off.-xβ Use hexadecimal digits for output.
β Video Mode Support β
Note that not all modes listed above may be supported by the video hardware. You can verify which mode is supported by the video hardware, using the -i mode option. π
The VESA BIOS support must be linked to the kernel or loaded as a KLD module if you wish to use VESA video modes or 132 column modes (see vga(4)).
You need to compile your kernel with the VGA_WIDTH90 option if you wish to use VGA 90 column modes (see vga(4)). πΈ
Video modes other than 25 and 30 line modes may require specific size of font. Use the -f option above to load a font file to the kernel. And bestie, hear me β if the required size of font has not been loaded to the kernel, vidcontrol will straight up fail when you try to set a new video mode. No vibes, just error.
Here's the size matchmaking chart:
- 25 line modes β
8x16(VGA),8x14(EGA) - 30 line modes β
8x16 - 43 line modes β
8x8 - 50 line modes β
8x8 - 60 line modes β
8x8
It is better to always load all three sizes (8x8, 8x14 and 8x16) of the same font. Like, just get the whole set, it's giving prepared.
You may set variables in /etc/rc.conf or /etc/rc.conf.local so that the desired font files get automatically loaded when the system starts up. See below, bestie π
If you want to use any of the raster text modes you need to recompile your kernel with the SC_PIXEL_MODE option. See syscons(4) or vt(4) (depending on which driver you use) for more details on this kernel option. Recompiling a kernel for a text mode is a whole personality trait, but okay, slay π«Ά
π Format of Video Buffer Dump π
The vidcontrol utility uses the syscons(4) CONS_SCRSHOT ioctl(2) to capture the current contents of the video buffer. Then it writes version and additional information to the standard output, followed by the contents of the video buffer. Screenshot behavior, literally πΈ
VGA video memory is typically arranged in two byte tuples, one per character position. In each tuple, the first byte is the character code, and the second byte is the character's color attribute.
The VGA color attribute byte looks like this:
- bit
7β<X0000000>β width1β character blinking - bits
6:4β<0XXX0000>β width3β background color - bit
3β<0000X000>β width1β bright foreground color - bits
2:0β<00000XXX>β width3β foreground color
Here's the list of the three bit wide base colors:
0β Black1β Blue2β Green3β Cyan4β Red5β Magenta6β Brown7β Light Grey
And the base colors with bit 3 (the bright foreground flag) set:
0β Dark Grey1β Light Blue2β Light Green3β Light Cyan4β Light Red5β Light Magenta6β Yellow7β White
For example, the two bytes
65 158
specify an uppercase A (character code 65), blinking (bit 7 set) in yellow (bits 3:0) on a blue background (bits 6:4). Blinking yellow-on-blue A. Main character energy, honestly π
The vidcontrol output contains a small header which includes additional information which may be useful to utilities processing the output.
The first 10 bytes are always arranged as follows:
- Bytes
1 - 8β Literal text βSCRSHOT_β - Byte
9β File format version number - Byte
10β Remaining number of bytes in the header
Subsequent bytes depend on the version number.
- Version
1:- Byte
11β Terminal width, in characters - Byte
12β Terminal depth, in characters - Byte
13and up β The snapshot data
- Byte
So a dump of an 80x25 screen would start (in hex) like:
53 43 52 53 48 4f 54 5f 01 02 50 19
----------------------- -- -- -- --
| | | | ` 25 decimal
| | | `--- 80 decimal
| | `------ 2 remaining bytes of header data
| `--------- File format version 1
`------------------------ Literal "SCRSHOT_"
π VIDEO OUTPUT CONFIGURATION π
β¨ Boot Time Configuration β¨
You may set the following variables in /etc/rc.conf or /etc/rc.conf.local in order to configure the video output at boot time. Set-it-and-forget-it era π¦
blanktimeβ Sets the timeout value for the-toption.font8x16,font8x14,font8x8β Specifies font files for the-foption.scrnmapβ Specifies a screen output map file for the-loption.
See rc.conf(5) for more details. (Yes, the manpage says "see below" earlier and then sends you to rc.conf(5) β that's just how it is, iykyk.)
πΈ Driver Configuration πΈ
The video card driver may let you change default configuration options, such as the default font, so that you do not need to set up the options at boot time. See video card driver manuals, (e.g., vga(4)) for details.
β FILES β
/usr/share/syscons/fonts/*/usr/share/vt/fonts/*β font files./usr/share/syscons/scrnmaps/*β screen output map files (relevant forsyscons(4)only).
π₯ EXAMPLES π₯
If you want to load /usr/share/syscons/fonts/iso-8x16.fnt to the kernel, run vidcontrol as:
vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
So long as the font file is in /usr/share/syscons/fonts (if using syscons) or /usr/share/vt/fonts (if using vt), you may abbreviate the file name as iso-8x16:
vidcontrol -f 8x16 iso-8x16
Furthermore, you can also omit font size β8x16β:
vidcontrol -f iso-8x16
Moreover, the suffix specifying the font size can also be omitted; in this case, vidcontrol will use the size of the currently displayed font to construct the suffix:
vidcontrol -f iso
The abbreviation slope is real, and honestly? We love a low-effort queen π
Likewise, you can also abbreviate the screen output map file name for the -l option if the file is found in /usr/share/syscons/scrnmaps.
vidcontrol -l iso-8859-1_to_cp437
The above command will load /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm.
The following command will set-up a 100x37 raster text mode (useful for some LCD models):
vidcontrol -g 100x37 VESA_800x600
The following command will capture the contents of the first virtual terminal video buffer, and redirect the output to the shot.scr file:
vidcontrol -p < /dev/ttyv0 > shot.scr
The following command will dump contents of the fourth virtual terminal video buffer to the standard output in the human readable format:
vidcontrol -P < /dev/ttyv3
π¦ SEE ALSO π¦
kbdcontrol(1), vidfont(1), keyboard(4), screen(4), syscons(4), vga(4), vt(4), rc.conf(5), kldload(8), moused(8), watch(8)
The various scr2* utilities in the graphics and textproc categories of the Ports Collection. Go browse, bestie π
π AUTHORS π
- SΓΈren Schmidt
<sos@FreeBSD.org> - Sascha Wildner
<saw@online.de>
π«Ά CONTRIBUTORS π«Ά
- Maxim Sobolev
<sobomax@FreeBSD.org> - Nik Clayton
<nik@FreeBSD.org>
That's the whole page, no cap. This one's from Debian, dated November 22, 2025 β so when you're citing it in your group chat, that's the receipt. Love that for us πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms