|Main index||Section 1||日本語||한국인||Options|
The following command line options are supported:
Select a new video mode.
The modes currently recognized are:
The raster text mode
can also be chosen.
Alternatively, a mode can be specified with its number by using a mode name of
A list of valid mode numbers can be obtained with the
|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 the show command below to see available colors.|
|show||See the supported colors on a given platform.|
|Set border color to color. This option may not be always supported by the video driver.|
|Clear the history buffer.|
|Change the cursor appearance. The cursor is either an inverting block ( normal) that can optionally blink, or it can be like the old hardware cursor ( destructive). The latter is actually a simulation.|
|Print out current output screen map.|
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 font 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).
|Set the geometry of the text mode for the modes with selectable geometry. Currently only raster modes, such as VESA_800x600, support this option. See also Video Mode Support and EXAMPLES below.|
|Set the size of the history (scrollback) buffer to size lines.|
|Shows the active vty number.|
|Shows info about the current video adapter.|
|Shows the possible video modes with the current video hardware.|
|Install screen output map file from screen_map. See also syscons(4) or vt(4) (depending on which driver you use).|
|Install default screen output map.|
|Sets the base character used to render the mouse pointer to char.|
|Switch the mouse pointer on or off. Used together with the moused(8) daemon for text mode cut & paste functionality.|
|Capture the current contents of the video buffer corresponding to the terminal device referred to by standard input. The vidcontrol utility 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.|
When used with
|Change reverse mode colors to foreground and background.|
|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 the DDB option. However, you probably should not compile the kernel debugger on a box which is supposed to be physically secure.|
|Set the active vty to number.|
|Switch between xterm and cons25 style terminal emulation.|
|Set the screensaver timeout to N seconds, or turns it off.|
|Use hexadecimal digits for output.|
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.
|Font size 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.
You may set variables in /etc/rc.conf or /etc/rc.conf.local so that desired font files will be automatically loaded when the system starts up. See below.
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.
VGA video memory is typically arranged in two byte tuples, one per character position. In each tuple, the first byte will be the character code, and the second byte is the character's color attribute.
The VGA color attribute byte looks like this:
|meaning 7 Ta <X0000000> Ta 1||character blinking 6:4 Ta <0XXX0000> Ta 3||background color 3 Ta <0000X000> Ta 1||bright foreground color 2:0 Ta <00000XXX> Ta 3||foreground color|
Here is a list of the three bit wide base colors:
Base colors with bit 3 (the bright foreground flag) set:
For example, the two bytes
specify an uppercase A (character code 65), blinking (bit 7 set) in yellow (bits 3:0) on a blue background (bits 6:4).
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:
1 thru 8
|Literal text "SCRSHOT_"|
|File format version number|
|Remaining number of bytes in the header|
Subsequent bytes depend on the version number.
|Version Ta Byte||Meaning|
1 Ta 11
|Terminal width, in characters|
|Terminal depth, in characters|
Ta 13 and up
|The snapshot data|
So a dump of an 80x25 screen would start (in hex)
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_"
Sets the timeout value for the
|font8x16 , font8x14 , font8x8|
Specifies font files for the
Specifies a screen output map file for the
See rc.conf(5) for more details.
|/usr/share/syscons/scrnmaps/*||screen output map files (relevant for syscons(4) only).|
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 be also omitted; in this case, vidcontrol will use the size of the currently displayed font to construct the suffix:
vidcontrol -f iso
Likewise, you can also abbreviate the screen output map file name for
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
The various scr2* utilities in the graphics and textproc categories of the Ports Collection.
|VIDCONTROL (1)||January 19, 2016|
|Main index||Section 1||日本語||한국인||Options|
|“||If you have any trouble sounding condescending, find a Unix user to show you how it's done.||”|
|— Scott Adams|