2 .\" vidcontrol - a utility for manipulating the syscons video driver
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
21 .Nd system console control and configuration utility
26 .Op Fl c Ar appearance
34 .Op Fl i Cm adapter | mode
35 .Op Fl l Ar screen_map
38 .Op Fl r Ar foreground Ar background
41 .Op Fl t Ar N | Cm off
43 .Op Ar foreground Op Ar background
48 command is used to set various options for the
51 such as video mode, colors, cursor shape, screen output map, font and screen
54 The following command line options are supported:
55 .Bl -tag -width indent
57 Select a new video mode.
58 The modes currently recognized are:
92 .Sx Video Mode Support
94 .It Ar foreground Op Ar background
95 Change colors when displaying text.
96 Specify the foreground color
98 .Dq vidcontrol white ) ,
99 or both a foreground and background colors
101 .Dq vidcontrol yellow blue ) .
104 command below to see available colors.
106 See the supported colors on a given platform.
110 This option may not be always supported by the video driver.
112 Clear the history buffer.
113 .It Fl c Cm normal | blink | destructive
114 Change the cursor appearance.
115 The cursor is either an inverting block
119 or it can be like the old hardware cursor
121 The latter is actually a simulation.
123 Print out current output screen map.
138 The font file can be either uuencoded or in raw binary format.
139 You can also use the menu-driven
141 command to load the font of your choice.
144 may be omitted, in this case
146 will try to guess it from the size of font file.
148 Note that older video cards, such as MDA and CGA, do not support
151 .Sx Video Mode Support
154 below and the man page for
159 of the text mode for the modes with selectable
161 Currently only raster modes, such as
165 .Sx Video Mode Support
170 Set the size of the history (scrollback) buffer to
174 Shows info about the current video adapter.
176 Shows the possible video modes with the current video hardware.
177 .It Fl l Ar screen_map
178 Install screen output map file from
183 Install default screen output map.
185 Sets the base character used to render the mouse pointer to
188 Switch the mouse pointer
192 Used together with the
194 daemon for text mode cut & paste functionality.
196 Capture the current contents of the video buffer corresponding
197 to the terminal device referred to by standard input.
200 utility writes contents of the video buffer to the standard
201 output in a raw binary format.
202 For details about that
204 .Sx Format of Video Buffer Dump
209 but dump contents of the video buffer in a plain text format
210 ignoring nonprintable characters and information about text
219 to dump full history buffer instead of visible portion of
220 the video buffer only.
221 .It Fl r Ar foreground background
222 Change reverse mode colors to
227 Turn vty switching on or off.
228 When vty switching is off,
229 attempts to switch to a different virtual terminal will fail.
230 (The default is to permit vty switching.)
232 Set the current vty to
234 .It Fl t Ar N | Cm off
235 Set the screensaver timeout to
240 Use hexadecimal digits for output.
242 .Ss Video Mode Support
243 Note that not all modes listed above may be supported by the video
245 You can verify which mode is supported by the video hardware, using the
249 The VESA BIOS support must be linked to the kernel
250 or loaded as a KLD module if you wish to use VESA video modes
255 You need to compile your kernel with the
257 option if you wish to use VGA 90 column modes
261 Video modes other than 25 and 30 line modes may require specific size of font.
264 option above to load a font file to the kernel.
265 If the required size of font has not been loaded to the kernel,
267 will fail if the user attempts to set a new video mode.
269 .Bl -column "25 line modes" "8x16 (VGA), 8x14 (EGA)" -compact
270 .Sy Modes Ta Sy Font size
271 .Li 25 line modes Ta 8x16 (VGA), 8x14 (EGA)
272 .Li 30 line modes Ta 8x16
273 .Li 43 line modes Ta 8x8
274 .Li 50 line modes Ta 8x8
275 .Li 60 line modes Ta 8x8
278 It is better to always load all three sizes (8x8, 8x14 and 8x16)
281 You may set variables in
284 .Pa /etc/rc.conf.local
285 so that desired font files will be automatically loaded
286 when the system starts up.
289 If you want to use the raster text mode
291 you need to recompile your kernel with the
296 for more details on this kernel option.
297 .Ss Format of Video Buffer Dump
304 to capture the current contents of the video buffer.
307 utility writes version and additional information to the standard
308 output, followed by the contents of the terminal device.
310 VGA video memory is typically arranged in two byte tuples,
311 one per character position.
312 In each tuple, the first byte will be the character code,
313 and the second byte is the character's color attribute.
315 The VGA color attribute byte looks like this:
317 .Bl -column "X:X" "<00000000>" "width" "bright foreground color"
318 .Sy "bits# width meaning"
319 .Li "7 <X0000000> 1 character blinking"
320 .Li "6:4 <0XXX0000> 3 background color"
321 .Li "3 <0000X000> 1 bright foreground color"
322 .Li "2:0 <00000XXX> 3 foreground color"
325 Here is a list of the three bit wide base colors:
327 .Bl -hang -offset indent -compact
346 Base colors with bit 3 (the bright foreground flag) set:
348 .Bl -hang -offset indent -compact
367 For example, the two bytes
371 specify an uppercase A (character code 65), blinking
372 (bit 7 set) in yellow (bits 3:0) on a blue background
377 output contains a small header which includes additional
378 information which may be useful to utilities processing
381 The first 10 bytes are always arranged as follows:
382 .Bl -column "Byte range" "Contents" -offset indent
383 .It Sy "Byte Range Contents"
384 .It "1 thru 8 Literal text" Dq Li SCRSHOT_
385 .It "9 File format version number"
386 .It "10 Remaining number of bytes in the header"
389 Subsequent bytes depend on the version number.
390 .Bl -column "Version" "13 and up" -offset indent
391 .It Sy "Version Byte Meaning"
392 .It "1 11 Terminal width, in characters"
393 .It " 12 Terminal depth, in characters"
394 .It " 13 and up The snapshot data"
397 So a dump of an 80x25 screen would start (in hex)
398 .Bd -literal -offset indent
399 53 43 52 53 48 4f 54 5f 01 02 50 19
400 ----------------------- -- -- -- --
402 | | | `--- 80 decimal
403 | | `------ 2 remaining bytes of header data
404 | `--------- File format version 1
405 `------------------------ Literal "SCRSHOT_"
407 .Sh VIDEO OUTPUT CONFIGURATION
408 .Ss Boot Time Configuration
409 You may set the following variables in
412 .Pa /etc/rc.conf.local
413 in order to configure the video output at boot time.
415 .Bl -tag -width foo_bar_var -compact
417 Sets the timeout value for the
420 .It Ar font8x16 , font8x14 , font8x8
421 Specifies font files for the
425 Specifies a screen output map file for the
433 .Ss Driver Configuration
434 The video card driver may let you change default configuration
435 options, such as the default font, so that you do not need to set up
436 the options at boot time.
437 See video card driver manuals, (e.g.\&
441 .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact
442 .It Pa /usr/share/syscons/fonts/*
444 .It Pa /usr/share/syscons/scrnmaps/*
445 screen output map files.
449 .Pa /usr/share/syscons/fonts/iso-8x16.fnt
454 .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
456 So long as the font file is in
457 .Pa /usr/share/syscons/fonts ,
458 you may abbreviate the file name as
461 .Dl vidcontrol -f 8x16 iso-8x16
463 Furthermore, you can also omit font size
466 .Dl vidcontrol -f iso-8x16
468 Moreover, the suffix specifying the font size can be also omitted; in
471 will use the size of the currently displayed font to construct the
474 .Dl vidcontrol -f iso
476 Likewise, you can also abbreviate the screen output map file name for
479 option if the file is found in
480 .Pa /usr/share/syscons/scrnmaps .
482 .Dl vidcontrol -l iso-8859-1_to_cp437
484 The above command will load
485 .Pa /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm .
487 The following command will set-up a 100x37 raster text mode (useful for
490 .Dl vidcontrol -g 100x37 VESA_800x600
492 The following command will capture the contents of the first virtual
493 terminal, and redirect the output to the
497 .Dl vidcontrol -p < /dev/ttyv0 > shot.scr
499 The following command will dump contents of the fourth virtual terminal
500 to the standard output in the human readable format:
502 .Dl vidcontrol -P < /dev/ttyv3
522 .Em "Ports Collection" .
524 .An S\(/oren Schmidt Aq sos@FreeBSD.org
526 .An Maxim Sobolev Aq sobomax@FreeBSD.org ,
527 .An Nik Clayton Aq nik@FreeBSD.org