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.
14 .\" $FreeBSD: src/usr.sbin/vidcontrol/vidcontrol.1,v 1.24.2.14 2002/09/15 22:31:50 dd Exp $
15 .\" $DragonFly: src/usr.sbin/vidcontrol/vidcontrol.1,v 1.2 2003/06/17 04:30:03 dillon Exp $
22 .Nd system console control and configuration utility
27 .Op Fl c Ar appearance
35 .Op Fl i Cm adapter | mode
36 .Op Fl l Ar screen_map
39 .Op Fl r Ar foreground Ar background
42 .Op Fl t Ar N | Cm off
44 .Op Ar foreground Op Ar background
49 command is used to set various options for the
52 such as video mode, colors, cursor shape, screen output map, font and screen
55 The following command line options are supported:
56 .Bl -tag -width indent
58 Select a new video mode.
59 The modes currently recognized are:
93 .Sx Video Mode Support
95 .It Ar foreground Op Ar background
96 Change colors when displaying text.
97 Specify the foreground color
99 .Dq vidcontrol white ) ,
100 or both a foreground and background colors
102 .Dq vidcontrol yellow blue ) .
105 command below to see available colors.
107 See the supported colors on a given platform.
111 This option may not be always supported by the video driver.
113 Clear the history buffer.
114 .It Fl c Cm normal | blink | destructive
115 Change the cursor appearance.
116 The cursor is either an inverting block
120 or it can be like the old hardware cursor
122 The latter is actually a simulation.
124 Print out current output screen map.
139 The font file can be either uuencoded or in raw binary format.
140 You can also use the menu-driven
142 command to load the font of your choice.
145 may be omitted, in this case
147 will try to guess it from the size of font file.
149 Note that older video cards, such as MDA and CGA, do not support
152 .Sx Video Mode Support
155 below and the man page for
160 of the text mode for the modes with selectable
162 Currently only raster modes, such as
166 .Sx Video Mode Support
171 Set the size of the history (scrollback) buffer to
175 Shows info about the current video adapter.
177 Shows the possible video modes with the current video hardware.
178 .It Fl l Ar screen_map
179 Install screen output map file from
184 Install default screen output map.
186 Sets the base character used to render the mouse pointer to
189 Switch the mouse pointer
193 Used together with the
195 daemon for text mode cut & paste functionality.
197 Capture the current contents of the video buffer corresponding
198 to the terminal device referred to by standard input.
201 utility writes contents of the video buffer to the standard
202 output in a raw binary format.
203 For details about that
205 .Sx Format of Video Buffer Dump
210 but dump contents of the video buffer in a plain text format
211 ignoring nonprintable characters and information about text
213 .It Fl r Ar foreground background
214 Change reverse mode colors to
219 Turn vty switching on or off.
220 When vty switching is off,
221 attempts to switch to a different virtual terminal will fail.
222 (The default is to permit vty switching.)
224 Set the current vty to
226 .It Fl t Ar N | Cm off
227 Set the screensaver timeout to
232 Use hexadecimal digits for output.
234 .Ss Video Mode Support
235 Note that not all modes listed above may be supported by the video
237 You can verify which mode is supported by the video hardware, using the
241 The VESA BIOS support must be linked to the kernel
242 or loaded as a KLD module if you wish to use VESA video modes
247 You need to compile your kernel with the
249 option if you wish to use VGA 90 column modes
253 Video modes other than 25 and 30 line modes may require specific size of font.
256 option above to load a font file to the kernel.
257 If the required size of font has not been loaded to the kernel,
259 will fail if the user attempts to set a new video mode.
261 .Bl -column "25 line modes" "8x16 (VGA), 8x14 (EGA)" -compact
262 .Sy Modes Ta Sy Font size
263 .Li 25 line modes Ta 8x16 (VGA), 8x14 (EGA)
264 .Li 30 line modes Ta 8x16
265 .Li 43 line modes Ta 8x8
266 .Li 50 line modes Ta 8x8
267 .Li 60 line modes Ta 8x8
270 It is better to always load all three sizes (8x8, 8x14 and 8x16)
273 You may set variables in
276 .Pa /etc/rc.conf.local
277 so that desired font files will be automatically loaded
278 when the system starts up.
281 If you want to use the raster text mode
283 you need to recompile your kernel with the
288 for more details on this kernel option.
289 .Ss Format of Video Buffer Dump
296 to capture the current contents of the video buffer.
299 utility writes version and additional information to the standard
300 output, followed by the contents of the terminal device.
302 PC video memory is typically arranged in two byte tuples,
303 one per character position.
304 In each tuple, the first byte
305 will be the character code, and the second byte is the
306 character's color attribute.
308 The color attribute byte is further broken down in to the
309 low nibble, which specifies which of 16 different foreground
310 colors is active, and the high nibble, which specifies which
311 of 16 different background colors is active.
313 .Bl -hang -offset indent -compact
348 It can be seen that the last 8 colors are brighter
349 versions of the first 8.
351 For example, the two bytes
355 specify an uppercase A (character code 65), in
356 yellow (low nibble 15) on a light blue background
361 output contains a small header which includes additional
362 information which may be useful to utilities processing
365 The first 10 bytes are always arranged as follows:
366 .Bl -column "Byte range" "Contents" -offset indent
367 .It Sy "Byte Range Contents"
368 .It "1 thru 8 Literal text" Dq Li SCRSHOT_
369 .It "9 File format version number"
370 .It "10 Remaining number of bytes in the header"
373 Subsequent bytes depend on the version number.
374 .Bl -column "Version" "13 and up" -offset indent
375 .It Sy "Version Byte Meaning"
376 .It "1 11 Terminal width, in characters"
377 .It " 12 Terminal depth, in characters"
378 .It " 13 and up The snapshot data"
381 So a dump of an 80x25 screen would start (in hex)
382 .Bd -literal -offset indent
383 53 43 52 53 48 4f 54 5f 01 02 50 19
384 ----------------------- -- -- -- --
386 | | | `--- 80 decimal
387 | | `------ 2 remaining bytes of header data
388 | `--------- File format version 1
389 `------------------------ Literal "SCRSHOT_"
391 .Sh VIDEO OUTPUT CONFIGURATION
392 .Ss Boot Time Configuration
393 You may set the following variables in
396 .Pa /etc/rc.conf.local
397 in order to configure the video output at boot time.
399 .Bl -tag -width foo_bar_var -compact
401 Sets the timeout value for the
404 .It Ar font8x16 , font8x14 , font8x8
405 Specifies font files for the
409 Specifies a screen output map file for the
417 .Ss Driver Configuration
418 The video card driver may let you change default configuration
419 options, such as the default font, so that you do not need to set up
420 the options at boot time.
421 See video card driver manuals, (e.g.\&
425 .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact
426 .It Pa /usr/share/syscons/fonts/*
428 .It Pa /usr/share/syscons/scrnmaps/*
429 screen output map files.
433 .Pa /usr/share/syscons/fonts/iso-8x16.fnt
438 .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
440 So long as the font file is in
441 .Pa /usr/share/syscons/fonts ,
442 you may abbreviate the file name as
445 .Dl vidcontrol -f 8x16 iso-8x16
447 Furthermore, you can also omit font size
450 .Dl vidcontrol -f iso-8x16
452 Moreover, the suffix specifying the font size can be also omitted; in
455 will use the size of the currently displayed font to construct the
458 .Dl vidcontrol -f iso
460 Likewise, you can also abbreviate the screen output map file name for
463 option if the file is found in
464 .Pa /usr/share/syscons/scrnmaps .
466 .Dl vidcontrol -l iso-8859-1_to_cp437
468 The above command will load
469 .Pa /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm .
471 The following command will set-up a 100x37 raster text mode (useful for
474 .Dl vidcontrol -g 100x37 VESA_800x600
476 The following command will capture the contents of the first virtual
477 terminal, and redirect the output to the
481 .Dl vidcontrol -p < /dev/ttyv0 > shot.scr
483 The following command will dump contents of the fourth virtual terminal
484 to the standard output in the human readable format:
486 .Dl vidcontrol -P < /dev/ttyv3
506 .Em "Ports Collection" .
508 .An S\(/oren Schmidt Aq sos@FreeBSD.org