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:
83 .\"can also be chosen.
84 Alternatively, a mode can be specified with its number by using a mode name of
87 A list of valid mode numbers can be obtained with the
90 .Sx Video Mode Support
92 .It Ar foreground Op Ar background
93 Change colors when displaying text.
94 Specify the foreground color
96 .Dq vidcontrol white ) ,
97 or both a foreground and background colors
99 .Dq vidcontrol yellow blue ) .
102 command below to see available colors.
104 See the supported colors on a given platform.
108 This option may not be always supported by the video driver.
110 Clear the history buffer.
111 .It Fl c Cm normal | blink | destructive
112 Change the cursor appearance.
113 The cursor is either an inverting block
117 or it can be like the old hardware cursor
119 The latter is actually a simulation.
121 Print out current output screen map.
136 The font file can be either uuencoded or in raw binary format.
137 You can also use the menu-driven
139 command to load the font of your choice.
142 may be omitted, in this case
144 will try to guess it from the size of font file.
147 .Sx Video Mode Support
150 below and the man page for
155 of the text mode for the modes with selectable
157 Currently only raster modes support this option.
159 .Sx Video Mode Support
164 Set the size of the history (scrollback) buffer to
168 Shows info about the current video adapter.
170 Shows the possible video modes with the current video hardware.
171 .It Fl l Ar screen_map
172 Install screen output map file from
177 Install default screen output map.
179 Sets the base character used to render the mouse pointer to
182 Switch the mouse pointer
186 Used together with the
188 daemon for text mode cut & paste functionality.
190 Capture the current contents of the video buffer corresponding
191 to the terminal device referred to by standard input.
194 utility writes contents of the video buffer to the standard
195 output in a raw binary format.
196 For details about that
198 .Sx Format of Video Buffer Dump
203 but dump contents of the video buffer in a plain text format
204 ignoring nonprintable characters and information about text
206 .It Fl r Ar foreground background
207 Change reverse mode colors to
212 Turn vty switching on or off.
213 When vty switching is off,
214 attempts to switch to a different virtual terminal will fail.
215 (The default is to permit vty switching.)
217 Set the current vty to
219 .It Fl t Ar N | Cm off
220 Set the screensaver timeout to
225 Use hexadecimal digits for output.
227 .Ss Video Mode Support
228 Note that not all modes listed above may be supported by the video
230 You can verify which mode is supported by the video hardware, using the
234 You need to compile your kernel with the
236 option if you wish to use VGA 90 column modes
240 Video modes other than 25 and 30 line modes may require specific size of font.
243 option above to load a font file to the kernel.
244 If the required size of font has not been loaded to the kernel,
246 will fail if the user attempts to set a new video mode.
248 .Bl -column "25 line modes" "8x16 (VGA), 8x14 (EGA)" -compact
249 .Sy Modes Ta Sy Font size
250 .Li 25 line modes Ta 8x16 (VGA), 8x14 (EGA)
251 .Li 30 line modes Ta 8x16
252 .Li 43 line modes Ta 8x8
253 .Li 50 line modes Ta 8x8
254 .Li 60 line modes Ta 8x8
257 It is better to always load all three sizes (8x8, 8x14 and 8x16)
260 You may set variables in
263 .Pa /etc/rc.conf.local
264 so that desired font files will be automatically loaded
265 when the system starts up.
268 If you want to use any of the raster text modes you need to recompile your
274 for more details on this kernel option.
275 .Ss Format of Video Buffer Dump
282 to capture the current contents of the video buffer.
285 utility writes version and additional information to the standard
286 output, followed by the contents of the terminal device.
288 PC video memory is typically arranged in two byte tuples,
289 one per character position.
290 In each tuple, the first byte
291 will be the character code, and the second byte is the
292 character's color attribute.
294 The color attribute byte is further broken down into the
295 low nibble, which specifies which of 16 different foreground
296 colors is active, and the high nibble, which specifies which
297 of 16 different background colors is active.
299 .Bl -hang -offset indent -compact
334 It can be seen that the last 8 colors are brighter
335 versions of the first 8.
337 For example, the two bytes
341 specify an uppercase A (character code 65), in
342 yellow (low nibble 15) on a light blue background
347 output contains a small header which includes additional
348 information which may be useful to utilities processing
351 The first 10 bytes are always arranged as follows:
352 .Bl -column "Byte range" "Contents" -offset indent
353 .It Sy "Byte Range Contents"
354 .It "1 thru 8 Literal text" Dq Li SCRSHOT_
355 .It "9 File format version number"
356 .It "10 Remaining number of bytes in the header"
359 Subsequent bytes depend on the version number.
360 .Bl -column "Version" "13 and up" -offset indent
361 .It Sy "Version Byte Meaning"
362 .It "1 11 Terminal width, in characters"
363 .It " 12 Terminal depth, in characters"
364 .It " 13 and up The snapshot data"
367 So a dump of an 80x25 screen would start (in hex)
368 .Bd -literal -offset indent
369 53 43 52 53 48 4f 54 5f 01 02 50 19
370 ----------------------- -- -- -- --
372 | | | `--- 80 decimal
373 | | `------ 2 remaining bytes of header data
374 | `--------- File format version 1
375 `------------------------ Literal "SCRSHOT_"
377 .Sh VIDEO OUTPUT CONFIGURATION
378 .Ss Boot Time Configuration
379 You may set the following variables in
382 .Pa /etc/rc.conf.local
383 in order to configure the video output at boot time.
385 .Bl -tag -width foo_bar_var -compact
387 Sets the timeout value for the
390 .It Ar font8x16 , font8x14 , font8x8
391 Specifies font files for the
395 Specifies a screen output map file for the
403 .Ss Driver Configuration
404 The video card driver may let you change default configuration
405 options, such as the default font, so that you do not need to set up
406 the options at boot time.
407 See video card driver manuals, (e.g.\&
411 .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact
412 .It Pa /usr/share/syscons/fonts/*
414 .It Pa /usr/share/syscons/scrnmaps/*
415 screen output map files.
419 .Pa /usr/share/syscons/fonts/iso-8x16.fnt
424 .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt
426 So long as the font file is in
427 .Pa /usr/share/syscons/fonts ,
428 you may abbreviate the file name as
431 .Dl vidcontrol -f 8x16 iso-8x16
433 Furthermore, you can also omit font size
436 .Dl vidcontrol -f iso-8x16
438 Moreover, the suffix specifying the font size can be also omitted; in
441 will use the size of the currently displayed font to construct the
444 .Dl vidcontrol -f iso
446 Likewise, you can also abbreviate the screen output map file name for
449 option if the file is found in
450 .Pa /usr/share/syscons/scrnmaps .
452 .Dl vidcontrol -l iso-8859-1_to_cp437
454 The above command will load
455 .Pa /usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm .
457 The following command will capture the contents of the first virtual
458 terminal, and redirect the output to the
462 .Dl vidcontrol -p < /dev/ttyv0 > shot.scr
464 The following command will dump contents of the fourth virtual terminal
465 to the standard output in the human readable format:
467 .Dl vidcontrol -P < /dev/ttyv3
487 .Em "Ports Collection" .
489 .An S\(/oren Schmidt Aq Mt sos@FreeBSD.org