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 utility 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:
91 Alternatively, a mode can be specified with its number by using a mode name of
93 .Li MODE_ Ns Aq Ar NUMBER .
94 A list of valid mode numbers can be obtained with the
98 .Sx Video Mode Support
100 .It Ar foreground Op Ar background
101 Change colors when displaying text.
102 Specify the foreground color
104 .Dq vidcontrol white ) ,
105 or both a foreground and background colors
107 .Dq vidcontrol yellow blue ) .
110 command below to see available colors.
112 See the supported colors on a given platform.
116 This option may not be always supported by the video driver.
118 Clear the history buffer.
119 .It Fl c Cm normal | blink | destructive
120 Change the cursor appearance.
121 The cursor is either an inverting block
125 or it can be like the old hardware cursor
127 The latter is actually a simulation.
129 Print out current output screen map.
144 The font file can be either uuencoded or in raw binary format.
145 You can also use the menu-driven
147 command to load the font of your choice.
150 may be omitted, in this case
152 will try to guess it from the size of font file.
154 Note that older video cards, such as MDA and CGA, do not support
157 .Sx Video Mode Support
160 below and the man page for
165 of the text mode for the modes with selectable
167 Currently only raster modes, such as
171 .Sx Video Mode Support
176 Set the size of the history (scrollback) buffer to
180 Shows info about the current video adapter.
182 Shows the possible video modes with the current video hardware.
183 .It Fl l Ar screen_map
184 Install screen output map file from
189 Install default screen output map.
191 Sets the base character used to render the mouse pointer to
194 Switch the mouse pointer
198 Used together with the
200 daemon for text mode cut & paste functionality.
202 Capture the current contents of the video buffer corresponding
203 to the terminal device referred to by standard input.
206 utility writes contents of the video buffer to the standard
207 output in a raw binary format.
208 For details about that
210 .Sx Format of Video Buffer Dump
215 but dump contents of the video buffer in a plain text format
216 ignoring nonprintable characters and information about text
225 to dump full history buffer instead of visible portion of
226 the video buffer only.
227 .It Fl r Ar foreground background
228 Change reverse mode colors to
233 Turn vty switching on or off.
234 When vty switching is off,
235 attempts to switch to a different virtual terminal will fail.
236 (The default is to permit vty switching.)
237 This protection can be easily bypassed when the kernel is compiled with
241 However, you probably should not compile the kernel debugger on a box which
242 is supposed to be physically secure.
244 Set the current vty to
246 .It Fl t Ar N | Cm off
247 Set the screensaver timeout to
252 Use hexadecimal digits for output.
254 .Ss Video Mode Support
255 Note that not all modes listed above may be supported by the video
257 You can verify which mode is supported by the video hardware, using the
261 The VESA BIOS support must be linked to the kernel
262 or loaded as a KLD module if you wish to use VESA video modes
267 You need to compile your kernel with the
269 option if you wish to use VGA 90 column modes
273 Video modes other than 25 and 30 line modes may require specific size of font.
276 option above to load a font file to the kernel.
277 If the required size of font has not been loaded to the kernel,
279 will fail if the user attempts to set a new video mode.
281 .Bl -column "25 line modes" "8x16 (VGA), 8x14 (EGA)" -compact
282 .Sy Modes Ta Sy Font size
283 .No 25 line modes Ta 8x16 (VGA), 8x14 (EGA)
284 .No 30 line modes Ta 8x16
285 .No 43 line modes Ta 8x8
286 .No 50 line modes Ta 8x8
287 .No 60 line modes Ta 8x8
290 It is better to always load all three sizes (8x8, 8x14 and 8x16)
293 You may set variables in
296 .Pa /etc/rc.conf.local
297 so that desired font files will be automatically loaded
298 when the system starts up.
301 If you want to use any of the raster text modes you need to recompile your
307 for more details on this kernel option.
308 .Ss Format of Video Buffer Dump
315 to capture the current contents of the video buffer.
318 utility writes version and additional information to the standard
319 output, followed by the contents of the video buffer.
321 VGA video memory is typically arranged in two byte tuples,
322 one per character position.
323 In each tuple, the first byte will be the character code,
324 and the second byte is the character's color attribute.
326 The VGA color attribute byte looks like this:
328 .Bl -column "X:X" "<00000000>" "width" "bright foreground color"
329 .Sy "bits# width meaning"
330 .Li "7 <X0000000> 1 character blinking"
331 .Li "6:4 <0XXX0000> 3 background color"
332 .Li "3 <0000X000> 1 bright foreground color"
333 .Li "2:0 <00000XXX> 3 foreground color"
336 Here is a list of the three bit wide base colors:
338 .Bl -hang -offset indent -compact
357 Base colors with bit 3 (the bright foreground flag) set:
359 .Bl -hang -offset indent -compact
378 For example, the two bytes
382 specify an uppercase A (character code 65), blinking
383 (bit 7 set) in yellow (bits 3:0) on a blue background
388 output contains a small header which includes additional
389 information which may be useful to utilities processing
392 The first 10 bytes are always arranged as follows:
393 .Bl -column "Byte range" "Contents" -offset indent
394 .It Sy "Byte Range Contents"
395 .It "1 thru 8 Literal text" Dq Li SCRSHOT_
396 .It "9 File format version number"
397 .It "10 Remaining number of bytes in the header"
400 Subsequent bytes depend on the version number.
401 .Bl -column "Version" "13 and up" -offset indent
402 .It Sy "Version Byte Meaning"
403 .It "1 11 Terminal width, in characters"
404 .It " 12 Terminal depth, in characters"
405 .It " 13 and up The snapshot data"
408 So a dump of an 80x25 screen would start (in hex)
409 .Bd -literal -offset indent
410 53 43 52 53 48 4f 54 5f 01 02 50 19
411 ----------------------- -- -- -- --
413 | | | `--- 80 decimal
414 | | `------ 2 remaining bytes of header data
415 | `--------- File format version 1
416 `------------------------ Literal "SCRSHOT_"
418 .Sh VIDEO OUTPUT CONFIGURATION
419 .Ss Boot Time Configuration
420 You may set the following variables in
423 .Pa /etc/rc.conf.local
424 in order to configure the video output at boot time.
426 .Bl -tag -width foo_bar_var -compact
428 Sets the timeout value for the
431 .It Ar font8x16 , font8x14 , font8x8
432 Specifies font files for the
436 Specifies a screen output map file for the
444 .Ss Driver Configuration
445 The video card driver may let you change default configuration
446 options, such as the default font, so that you do not need to set up
447 the options at boot time.
448 See video card driver manuals, (e.g.\&
452 .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact
453 .It Pa /usr/share/syscons/fonts/*
455 .It Pa /usr/share/syscons/scrnmaps/*
456 screen output map files.
460 .Pa /usr/share/syscons/fonts/iso-8x16.fnt
465 .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
467 So long as the font file is in
468 .Pa /usr/share/syscons/fonts ,
469 you may abbreviate the file name as
472 .Dl vidcontrol -f 8x16 iso-8x16
474 Furthermore, you can also omit font size
477 .Dl vidcontrol -f iso-8x16
479 Moreover, the suffix specifying the font size can be also omitted; in
482 will use the size of the currently displayed font to construct the
485 .Dl vidcontrol -f iso
487 Likewise, you can also abbreviate the screen output map file name for
490 option if the file is found in
491 .Pa /usr/share/syscons/scrnmaps .
493 .Dl vidcontrol -l iso-8859-1_to_cp437
495 The above command will load
496 .Pa /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm .
498 The following command will set-up a 100x37 raster text mode (useful for
501 .Dl vidcontrol -g 100x37 VESA_800x600
503 The following command will capture the contents of the first virtual
504 terminal video buffer, and redirect the output to the
508 .Dl vidcontrol -p < /dev/ttyv0 > shot.scr
510 The following command will dump contents of the fourth virtual terminal
512 to the standard output in the human readable format:
514 .Dl vidcontrol -P < /dev/ttyv3
534 .Em "Ports Collection" .
536 .An S\(/oren Schmidt Aq sos@FreeBSD.org
539 .An Maxim Sobolev Aq sobomax@FreeBSD.org ,
540 .An Nik Clayton Aq nik@FreeBSD.org