Modifying xv Behavior

xv supports literally dozens of command line options and X11 resources. Fortunately, it is doubtful that you'll ever need to use more than a small few. The rest are provided mainly for that 'one special case' application of xv... Note that you do not have to specify the entire option name, only enough characters to uniquely identify the option. Thus, '-geom' is a fine abbreviation of '-geometry'.

Command Line Options Overview

If you start xv with the command 'xv -help', the current (wildly out of control) list of options will be displayed:

xv [-] [-/+24] [-/+2xlimit] [-/+4x3] [-/+8] [-/+acrop] [-aspect w:h] [-best24] [-bg color] [-black color] [-bw width] [-/+cecmap] [-cegeometry geom] [-/+cemap] [-cgamma rval gval bval] [-cgeometry geom] [-/+clear] [-/+close] [-/+cmap] [-cmtgeometry geom] [-/+cmtmap] [-crop x y w h] [-cursor char#] [-DEBUG level] [-dir directory] [-display disp] [-/+dither] [-drift dx dy] [-expand exp | hexp:vexp] [-fg color] [-/+fixed] [-flist fname] [-gamma val] [-geometry geom] [-grabdelay seconds] [-gsdev str] [-gsgeom geom] [-gsres int] [-help] [-/+hflip] [-hi color] [-/+hist] [-/+hsv] [-icgeometry geom] [-/+iconic] [-igeometry geom] [-/+imap] [-/+lbrowse] [-lo color] [-/+loadclear] [-/+max] [-/+maxpect] [-mfn font] [-/+mono] [-name str] [-ncols #] [-/+ninstall] [-/+nodecor] [-/+nofreecols] [-/+nolimits] [-/+nopos] [-/+noqcheck] [-/+noresetroot] [-/+norm] [-/+nostat] [-/+owncmap] [-/+perfect] [-/+poll] [-preset #] [-quick24] [-/+quit] [-/+random] [-/+raw] [-rbg color] [-rfg color] [-/+rgb] [-RM] [-rmode #] [-/+root] [-rotate deg] [-/+rv] [-/+rw] [-slow24] [-/+smooth] [-/+stdcmap] [-tgeometry geom] [-/+vflip] [-/+viewonly] [-visual type] [-/+vsdisable] [-vsgeometry geom] [-/+vsmap] [-/+vsperfect] [-wait seconds] [-white color] [-/+wloop] [filename ...]

Yes, as a matter of fact, I am a little embarrassed about it.

One big change starting in xv 3.10: In the past, most of the command-line options were toggles, in that they would normally turn some feature on, but if you had an X resource that also turned that feature on, then they would turn that feature off. Now, they are absolute settings. For instance, '-rv' turns on reverse video mode, regardless of the setting of the 'xv.reverse' resource, and '+rv' turns off reverse video mode, regardless of the setting of the 'xv.reverse' resource. (Thanks Peder!)

General Options

Note: In the following sections, the part of the option name shown in boldface is the shortest allowable abbreviation of the option in question.

-help
Print usage instructions, listing the current available command-line options. Any unrecognized option will do this as well.
 
-display disp
Specifies the display that xv should attempt to connect to. If you don't specify a display, xv will use the environment variable $DISPLAY .
 
-fg color
Sets the foreground color used by the windows.
(Resource name: foreground . Type: string)
 
-bg color
Sets the background color used by the windows.
(Resource name: background . Type: string)
 
-hi color
Sets the highlight color used for the top-left edges of the control buttons.
(Resource name: highlight . Type: string)
 
-lo color
Sets the lowlight color used for the bottom-right edges of the control buttons, and also the background of some windows.
(Resource name: lowlight . Type: string)
 
-bw bwidth
Sets the width of the border on the windows. Your window manager may choose to ignore this, however.
(Resource name: borderWidth . Type: integer)

Image Sizing Options

-geometry geom
Lets you specify the size and placement of the 'image' window. It's most useful when you only specify a position, and let xv choose the size. If you specify a size as well, xv will create a window of that size, unless -fixed is specified. The geom argument is in the form of a normal X geometry string (e.g. "300x240" or "+10+10" or "400x300+10+10")
(Resource name: geometry . Type: string)
 
-/+fixed
Only used in conjunction with the -geometry option. If you specify a window size with the -geometry option, xv will normally stretch the picture to exactly that size. This is not always desirable, as it may seriously distort the aspect ratio of the picture. Specifying the -fixed option corrects this behavior by instructing xv to use the specified geometry size as a maximum window size. It will preserve the original aspect ratio of the picture. ( +fixed turns off this feature, forcing the image to be exactly the size specified by the -geometry option.)

For example, if you give a rectangular geometry of '320x240', and you try to display a square picture with a size of '256x256', the window opened will actually be '240x240', which is the largest square that still fits in the '320x240' rectangle that was specified.

(Resource name: fixed . Type: boolean)

-expand exp
Lets you specify an initial expansion or compression factor for the picture. You can specify floating-point values. Values larger than zero multiply the picture's dimensions by the given factor. (i.e., an expand factor of '3' will make a 320x200 image display as 960x600).

Factors less than zero are treated as reciprocals. (i.e., an expand factor of '-4' makes the picture 1/4 th its normal size.). '0' is not a valid expansion factor.

You can also specify a pair of expansion values, separated by a colon, to set different horizontal and vertical expansion ratios. For instance, '3:2' would expand images 3x horizontally, and 2x vertically.

(Resource name: expand . Type: string)

-aspect w:h
Lets you set an initial aspect ratio, and also sets the value used by the Aspect command. The aspect ratio of nearly every X display (and, in fact, any civilized graphics display) is 1:1. What this means is that pixels appear to be 'square'. A 100 pixel wide by 100 pixel high box will appear on the screen as a square. Unfortunately, this is not the case with some screens and digitizers. The -aspect option lets you stretch the picture so that the picture appears correctly on your display. Unlike the other size- related options, this one doesn't care what the size of the overall picture is. It operates on a pixel-by-pixel basis, stretching each image pixel slightly, in either width or height, depending on the ratio.

Aspect ratios greater than '1:1' (e.g., '4:3') make the picture wider than normal. Aspect ratios less than '1:1' (e.g. '2ifying-behavior-2.html#cmtmap">commentMap

  • ctrlGeometry
  • ctrlMap
  • cursor
  • defaultPreset
  • displayMods
  • dragApply
  • driftKludge
  • expand
  • fileList
  • fixed
  • force24
  • force8
  • foreground
  • geometry
  • gsDevice
  • gsGeometry
  • gsResolution
  • highlight
  • hsvMode
  • iconGeometry
  • iconic
  • infoGeometry
  • infoMap
  • loadBrowse
  • lowlight
  • mono
  • monofont
  • ncols
  • ninstall
  • nodecor
  • nolimits
  • nopos
  • noqcheck
  • nostat
  • ownCmap
  • perfect
  • print
  • pscompress
  • psorient
  • pspaper
  • pspreview
  • psres
  • quick24
  • resetroot
  • reverse
  • rootBackground
  • rootForeground
  • rootMode
  • rwColor
  • saveNormal
  • searchDirectory
  • slow24
  • textviewGeometry
  • useStdCmap
  • visual
  • vsDisable
  • vsGeometry
  • vsMap
  • vsPerfect
  • white
  • xbm format
  • xcmap program
  • xpm format
  • xv color editor window
  • xv controls window
  • xv grab window
  • xv info window
  • xv jpeg window
  • XV Keyboard Help command