6
Command-line Arguments
and XView Resources
This section lists XView properties that can be set with command-line options or by specify-
ing values for resources. Values for most properties can be overridden programatically using
XView attributes. For example, the position and size of an application’s base frame can be
set using the command-line option –geometry, or by changing the value of the
Window.Geometry resource. However, if the application sets its size and position by set-
ting attributes with xv_set(), the values specified in the call to xv_set() take precedence.
This section is divided into two parts: 6.1, which lists the properties that have an explicit
command-line option, and 6.2, which lists the properties that do not have an explicit com-
mand-line option.
XView properties may be set in a number of ways, as the following list indicates. The list
shows precedence for setting property values, from highest to lowest.
1. Calling xv_set() for one or more attributes that change the value of a property.
2. Specifying a flag name plus its value, if any, on the command line.
3. Editing or adding values for resource defaults in a ˜/.Xdefaults file.
4. Calling xv_create() for an object’s attributes.
5. Using the package default values for the property.
From this list, you can see that command-line options have precedence over values set during
xv_create(), but that all values are overridden by an explicit call to xv_set().
The command-line options –rv (reverse), –scale, –font, –foreground_color,
–background_color, and –icon_font apply to all top-level frames in the application.
The remaining options apply only to the first top-level frame created by the application.
Child subframes inherit properties from their parent frames. Therefore, command-line
options eventually propagate to subframes unless the options are overridden programatically.
Command-line Arguments
and XView Resources
Command-line Arguments and XView Resources 239
6.1 Command-line Options with Resources
–background
This option takes a single argument that is in the form of a predefined color name (lav-
ender, gray, goldenrod, etc.) from $OPENWINHOME/lib/rbg.txt or a hexidecimal rep-
resentation. The hexidecimal representation is of the form pound sign (#) followed by
the hexidecimal representation of the red, green, and blue aspects of the color. Also
see -Wb.
Short: –bg
Type: string (color name, or hexidecimal color specification)
Resource: Window.Color.Background
Default: white
Examples:
cmdtool -foreground blue -background gray
Provides a blue foreground, with a gray background.
cmdtool -foreground #d800ff -background white
Provides a purple foreground, with a white background.
–default
This option allows the user to set resources that don’t have command-line equivalents.
The format is –default resource-name value. The XView resources without spe-
cific command-line arguments are discussed in the following section.
Short: –Wd
Type: string string
Resource: Given by the first string
Default: None
Example:
cmdtool -default
OpenWindows.ScrollbarPlacement left
–defeateventsecurity
Enables an XView application to receive all synthethic events (sent via XSen-
dEvent()).
Short: –WS
Type: boolean
Resource: none
Default: FALSE
Example:
cmdtool -WS
240 XView Reference Manual
–depth
Specifies the window’s depth.
Type: int
Resource: Window.Depth
–disable_retained
This option is useful for applications running on a monochrome display, where server
memory is at a minimum. For performance reasons, monochrome windows are by
default retained by the server. Using retained windows will use more memory in the
X11 server; however, it also speeds up repainting when the window is covered and
uncovered by other windows. When -disable_retained is set, monochrome
windows are not retained, thus saving server memory.
Short: –Wdr
Type: Boolean
Resource: Window.Mono.DisableRetained
Default: Not retained on color systems. Retained on monochrome systems.
–disable_xio_error_handler
This option is useful for debugging an application. Whenever there is a fatal XIO
error, the server will print an error message before exiting. XView installs an error
handler to keep those messages from appearing. If you would like to see these mes-
sages, use this option.
Short: –Wdxio
Type: Boolean
Resource: None
Default: Enable XIO handler. Setting this option disables the XIO handler.
–display
Sets the name of the X11 server on which to connect. Host is the name or address of
the machine on whose server you have permission to display. Display is a number cor-
responding to the server on which to display for that machine, and screen corresponds
to which screen for the server. See manual page on xhost for more details on adding
to permissions list.
Short: –Wr
Type: String of the form: host:display{.screen}
Resource: Server.Name
Default: Taken from the DISPLAY environment variable.
Example:
cmdtool -display foobar:0
Brings up a cmdtool on the default screen of the display #0 on the
host foobar.
cmdtool -display foobar:0.1
Brings up a cmdtool on screen #1 of display #0 of host foobar.
Command-line Arguments
and XView Resources
Command-line Arguments and XView Resources 241
–font, –fn
Sets the name of the font used for the application (not control areas). To find out what
fonts are available, use the xlsfonts command.
Short: –Wt
Type: string
Resource: Font.Name or OpenWindows.RegularFont
Default: lucidasans-12
Example:
cmdtool -font fixed
If the font you specify cannot be found, an error message is shown.
For example:
XView warning: Cannot load font ’galant-24’ (Font package)
XView warning: Attempting to load font ’-
b&h-lucida-medium-r-normal-sans-*-120-
*-*-*-*-*-*’ instead (Font package)
–foreground
This option specifies the foreground color. For example, an application’s text in its
textsw would take on the foreground color. Also see the -background option for
information on similar functions. This option takes a single argument that is in the
form of a predefined color name (lavender, gray, goldenrod, etc.) from
$OPENWINHOME/lib/rbg.txt or a hexidecimal representation. The hexidecimal repre-
sentation is of the form pound sign (#) followed by the hexidecimal representation of
the red, green, and blue aspects of the color.
Short: –fg
Type: string
(color name, or hexidecimal color specification)
Resource: Window.Color.Foreground
Default: black
Example:
cmdtool -fg blue
Comes up with a blue foreground.
–foreground_color
This option allows the user to specify the foreground color of an application. It takes
three values that should be integers between 0 and 255. They specify the amount of
red, green, and blue that is in the color.
Short: –Wf
Type: integer integer integer
Resource: Window.Color.Foreground
Default: 0 0 0
Example:
cmdtool -Wf 0 0 255
Comes up with a blue foreground.
242 XView Reference Manual
–fullscreendebug
Enables or disables fullscreen debugging mode during which XGrabs (XGrab-
Server(), XGrabKeyboard(), XGrabPointer() ) are not done. When using
the FULLSCREEN package, the X11 server is normally grabbed. This prevents other
windows on the server from responding until the grab has been released by the one
window which initiated the grab. Refer to the manual Converting SunView Applica-
tions for further details.
Short: –Wfsdb
Type: Boolean
Resource: Fullscreen.Debug
Default: FALSE
–fullscreendebugkbd
Enables or disables keyboard grabbing using XGrabKeyboard() that is done via the
FULLSCREEN package.
Short: –Wfsdbk
Type: Boolean
Resource: Fullscreen.Debugkbd
Default: FALSE
–fullscreendebugptr
Enables or disables pointer grabbing XGrabPointer() that is done via the
FULLSCREEN package. Refer to Appendix F of the manual Converting SunView Appli-
cations for further details.
Short: –Wfsdbp
Type: Boolean
Resource: Fullscreen.Debugptr
Default: FALSE
–fullscreendebugserver
Enables or disables server grabbing using XGrabServer() that is done with the
FULLSCREEN package. Refer to Appendix F in the manual Converting SunView Appli-
cations for further details.
Short: –Wfsdbs
Type: Boolean
Resource: Fullscreen.Debugserver
Default: FALSE
–geometry
This sets both the size and the placement of the application’s base frame. This option
has priority over the –size and –position arguments. The size and placement
parts of the value are optional. You can set just the size, just the position, or both. The
size values are measured in pixels, and the position values use the same semantics as
-position. However, if you use the – (minus) in front of an x value, it will be taken
as relative to the right-hand side of the screen, instead of the left. Likewise, if you use
the – (minus) with the y value, it will be taken relative to the bottom of the screen
instead of the top.
Command-line Arguments
and XView Resources
Command-line Arguments and XView Resources 243
Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.