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 $
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:
91 Alternatively, a mode can be specified with its number by using a mode name of
94 A list of valid mode numbers can be obtained with the
97 .Sx Video Mode Support
99 .It Ar foreground Op Ar background
100 Change colors when displaying text.
101 Specify the foreground color
103 .Dq vidcontrol white ) ,
104 or both a foreground and background colors
106 .Dq vidcontrol yellow blue ) .
109 command below to see available colors.
111 See the supported colors on a given platform.
115 This option may not be always supported by the video driver.
117 Clear the history buffer.
118 .It Fl c Cm normal | blink | destructive
119 Change the cursor appearance.
120 The cursor is either an inverting block
124 or it can be like the old hardware cursor
126 The latter is actually a simulation.
128 Print out current output screen map.
143 The font file can be either uuencoded or in raw binary format.
144 You can also use the menu-driven
146 command to load the font of your choice.
149 may be omitted, in this case
151 will try to guess it from the size of font file.
154 .Sx Video Mode Support
157 below and the man page for
162 of the text mode for the modes with selectable
164 Currently only raster modes, such as
168 .Sx Video Mode Support
173 Set the size of the history (scrollback) buffer to
177 Shows info about the current video adapter.
179 Shows the possible video modes with the current video hardware.
180 .It Fl l Ar screen_map
181 Install screen output map file from
186 Install default screen output map.
188 Sets the base character used to render the mouse pointer to
191 Switch the mouse pointer
195 Used together with the
197 daemon for text mode cut & paste functionality.
199 Capture the current contents of the video buffer corresponding
200 to the terminal device referred to by standard input.
203 utility writes contents of the video buffer to the standard
204 output in a raw binary format.
205 For details about that
207 .Sx Format of Video Buffer Dump
212 but dump contents of the video buffer in a plain text format
213 ignoring nonprintable characters and information about text
215 .It Fl r Ar foreground background
216 Change reverse mode colors to
221 Turn vty switching on or off.
222 When vty switching is off,
223 attempts to switch to a different virtual terminal will fail.
224 (The default is to permit vty switching.)
226 Set the current vty to
228 .It Fl t Ar N | Cm off
229 Set the screensaver timeout to
234 Use hexadecimal digits for output.
236 .Ss Video Mode Support
237 Note that not all modes listed above may be supported by the video
239 You can verify which mode is supported by the video hardware, using the
243 The VESA BIOS support must be linked to the kernel
244 or loaded as a KLD module if you wish to use VESA video modes
249 You need to compile your kernel with the
251 option if you wish to use VGA 90 column modes
255 Video modes other than 25 and 30 line modes may require specific size of font.
258 option above to load a font file to the kernel.
259 If the required size of font has not been loaded to the kernel,
261 will fail if the user attempts to set a new video mode.
263 .Bl -column "25 line modes" "8x16 (VGA), 8x14 (EGA)" -compact
264 .Sy Modes Ta Sy Font size
265 .Li 25 line modes Ta 8x16 (VGA), 8x14 (EGA)
266 .Li 30 line modes Ta 8x16
267 .Li 43 line modes Ta 8x8
268 .Li 50 line modes Ta 8x8
269 .Li 60 line modes Ta 8x8
272 It is better to always load all three sizes (8x8, 8x14 and 8x16)
275 You may set variables in
278 .Pa /etc/rc.conf.local
279 so that desired font files will be automatically loaded
280 when the system starts up.
283 If you want to use any of the raster text modes you need to recompile your
289 for more details on this kernel option.
290 .Ss Format of Video Buffer Dump
297 to capture the current contents of the video buffer.
300 utility writes version and additional information to the standard
301 output, followed by the contents of the terminal device.
303 PC video memory is typically arranged in two byte tuples,
304 one per character position.
305 In each tuple, the first byte
306 will be the character code, and the second byte is the
307 character's color attribute.
309 The color attribute byte is further broken down into the
310 low nibble, which specifies which of 16 different foreground
311 colors is active, and the high nibble, which specifies which
312 of 16 different background colors is active.
314 .Bl -hang -offset indent -compact
349 It can be seen that the last 8 colors are brighter
350 versions of the first 8.
352 For example, the two bytes
356 specify an uppercase A (character code 65), in
357 yellow (low nibble 15) on a light blue background
362 output contains a small header which includes additional
363 information which may be useful to utilities processing
366 The first 10 bytes are always arranged as follows:
367 .Bl -column "Byte range" "Contents" -offset indent
368 .It Sy "Byte Range Contents"
369 .It "1 thru 8 Literal text" Dq Li SCRSHOT_
370 .It "9 File format version number"
371 .It "10 Remaining number of bytes in the header"
374 Subsequent bytes depend on the version number.
375 .Bl -column "Version" "13 and up" -offset indent
376 .It Sy "Version Byte Meaning"
377 .It "1 11 Terminal width, in characters"
378 .It " 12 Terminal depth, in characters"
379 .It " 13 and up The snapshot data"
382 So a dump of an 80x25 screen would start (in hex)
383 .Bd -literal -offset indent
384 53 43 52 53 48 4f 54 5f 01 02 50 19
385 ----------------------- -- -- -- --
387 | | | `--- 80 decimal
388 | | `------ 2 remaining bytes of header data
389 | `--------- File format version 1
390 `------------------------ Literal "SCRSHOT_"
392 .Sh VIDEO OUTPUT CONFIGURATION
393 .Ss Boot Time Configuration
394 You may set the following variables in
397 .Pa /etc/rc.conf.local
398 in order to configure the video output at boot time.
400 .Bl -tag -width foo_bar_var -compact
402 Sets the timeout value for the
405 .It Ar font8x16 , font8x14 , font8x8
406 Specifies font files for the
410 Specifies a screen output map file for the
418 .Ss Driver Configuration
419 The video card driver may let you change default configuration
420 options, such as the default font, so that you do not need to set up
421 the options at boot time.
422 See video card driver manuals, (e.g.\&
426 .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact
427 .It Pa /usr/share/syscons/fonts/*
429 .It Pa /usr/share/syscons/scrnmaps/*
430 screen output map files.
434 .Pa /usr/share/syscons/fonts/iso-8x16.fnt
439 .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
441 So long as the font file is in
442 .Pa /usr/share/syscons/fonts ,
443 you may abbreviate the file name as
446 .Dl vidcontrol -f 8x16 iso-8x16
448 Furthermore, you can also omit font size
451 .Dl vidcontrol -f iso-8x16
453 Moreover, the suffix specifying the font size can be also omitted; in
456 will use the size of the currently displayed font to construct the
459 .Dl vidcontrol -f iso
461 Likewise, you can also abbreviate the screen output map file name for
464 option if the file is found in
465 .Pa /usr/share/syscons/scrnmaps .
467 .Dl vidcontrol -l iso-8859-1_to_cp437
469 The above command will load
470 .Pa /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm .
472 The following command will set-up a 100x37 raster text mode (useful for
475 .Dl vidcontrol -g 100x37 VESA_800x600
477 The following command will capture the contents of the first virtual
478 terminal, and redirect the output to the
482 .Dl vidcontrol -p < /dev/ttyv0 > shot.scr
484 The following command will dump contents of the fourth virtual terminal
485 to the standard output in the human readable format:
487 .Dl vidcontrol -P < /dev/ttyv3
507 .Em "Ports Collection" .
509 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org