custom Command

Purpose

Enables users to customize X applications.

Syntax

custom-h |  -e Browser |  [  -s ResourceFile ]  [  Application ] ]

Description

The custom command starts the customizing tool, which is used to customize various aspects of applications.

The customizing tool can change the look of an application. It provides a user-friendly way to add resource values to your .Xdefaults file. Resources are customizable items such as colors, fonts, and other attributes that allow you to customize resources of a client application. Each application has its own set of unique resources, which are listed in an app-custom file. The customizing tool describes the resources available for modification for an application and the possible resource values you can select.

Flags

Item Description
-h Provides command line help.
-e Browser Calls one of the standalone browsers. Valid values for Browser are color, font, cursor, and picture.
-s ResourceFile Specifies the resource file from which to load and save resource settings. If the -s flag is not specified, the default is to load the values from the resource database stored in the RESOURCE_MANAGER property on the X server. If this database does not exist, then $HOME/.Xdefaults is loaded.

Most standard X Toolkit command-line options are understood by the custom command.The following table lists the standard command-line options:

Standard Command-Line Options in custom command
Option Information
-bg
Resource
*background
Value
Next argument
Sets
Background color
-background
Resource
*background
Value
Next argument
Sets
Background color
-bd1
Resource
*borderColor
Value
Next argument
Sets
Border color
-bordercolor1
Resource
*borderColor
Value
Next argument
Sets
Color of border
-bw
Resource
.borderWidth
Value
Next argument
Sets
Width of border in pixels
-borderWidth
Resource
.borderWidth
Value
Next argument
Sets
Width of border in pixels
-display
Resource
.display
Value
Next argument
Sets
Server to use
-fn2
Resource
*font
Value
Next argument
Sets
Font name
-font2
Resource
*font
Value
Next argument
Sets
Font name
-fg
Resource
*foreground
Value
Next argument
Sets
Foreground color
-foreground
Resource
*foreground
Value
Next argument
Sets
Foreground color
-geometry
Resource
.geometry
Value
Next argument
Sets
Size and position
-iconic
Resource
.iconic
Value
On
Sets
Start as an icon
-name
Resource
.name
Value
Next argument
Sets
Name of application
-reverse
Resource
*reverseVideo
Value
On
Sets
Reverse video
-rv
Resource
*reverseVideo
Value
On
Sets
Reverse video
+rv
Resource
*reverseVideo
Value
Off
Sets
No Reverse video
-selection- Timeout
Resource
.selection-Timeout
Value
Next argument
Sets
Selection timeout
-synchronous
Resource
*synchronous
Value
On
Sets
Synchronous debug mode
+synchronous
Resource
*synchronous
Value
Off
Sets
Synchronous debug mode
-title
Resource
.title
Value
Next argument
Sets
Title of application
-xrm
Resource
value of argument
Value
Next argument
Sets
Depends on argument
-xnllanguage
Resource
.xnlLanguage
Value
Next argument
Sets
Locale
Note:
  1. These options often have no visible effect on AIXwindows applications if the AIXwindows Window Manager is running.
  2. Motif applications do not generally respond to these options.
  3. Resources beginning with an* (asterisk) set the resource of every widget in the application to the same value.
  4. Resources that begin with a . (period) set the resources of only the application's top-level Shell widget.

Parameters

Item Description
Application Specifies the name or class of the application to customize.

Examples

  1. To start the customizing tool and use prompts to choose the application to customize, type the following:
    custom
  2. To start the customizing tool to modify the app-defaults file of the xcalc application, type the following:
    custom -s 
    /usr/lib/X11/app-defaults/XCalc xcalc

Resources

The customizing tool has the following application resources:

Item Description
listOfApps This resource is used to display the application names on the starting dialog. The application name and corresponding app-custom file must be listed in pairs with the following syntax:
Application:app-custom 
[,Application:app-custom]...

For example:

Custom.listOfApps: 
xclock:XClock,custom:Custom

You can specify a maximum of 100 applications.

colorEditor*rgbtxtPath This resource specifies the full path name of the rgb.txt file that the X server uses to define named colors. The default value is /usr/lib/X11/rgb.txt, which is correct for an X server running on a display that is directly attached to your system.
windowSearchDepth The customizing tool must determine the top-level shell window of the application. It startswith the root window and conducts a recursive search to a depth of three windows by default. This default can be changed using the windowSearchDepth resource.
timeout The Instant Changes button is grayed out until communication with the application is established. The amount of time to wait for the application to contact the customizing tool is controlled by the Custom*timeout resource.
resourceFile The resource file is where your resource changes are saved. The default is $HOME/.Xdefaults. The -s flag allows the user to override this value.
appCustomPath This resource specifies where the customizing tool is to look for the app-custom file. The appCustomPath string consists of a series of possible file names separated by colons. Within each name, the following values can be substituted:
%N
Name of the app-custom file (usually the same as the class name of the application).
%T
"app-custom"
%L
Locale in which custom is running.
%l
Language part of the locale.
%t
Territory part of the locale.
%c
Codeset part of the locale.
%:
A : (colon).
%%
A % (percent sign).
$envvar
Value of the named environment variable.
${envvar}
Value of the named environment variable.
$$
A $ (dollar sign).

The default value of appCustomPath is as follows:

$HOME/%L/%T/%N:\
$HOME/%T/%N:\
/usr/lib/X11/%L/%T/%N:\
/usr/lib/X11/%T/%N
topEditHighlight, bottomEditHighlight, foregroundEditHighlight, backgroundEditHighlight The Browser button is highlighted when a browser is called and unhighlighted when a browser is canceled. These resources set the highlight color for the top shadow, bottom shadow, foreground, and background of the Browser button.
pictureEditor*editor You can edit the bitmap or pixmap by pressing the Edit Picture button on the Pictures browser window. The editor is a separate application that exists on your system. It is called on your behalf. The Custom*pictureEditor*editor resource determines which editor commands to choose from. This resource accepts a list of commands separated by \n's (backslash 'n's). The first command that identifies an existing program that the user has permission to execute is used. The file name in the Chosen Picture text field is passed as a parameter to the editor when it is invoked. The default setting for this resource is:
 
Custom*pictureEditor*editor: 
/usr/dt/bin/dticon  -f \n                                                  
/usr/lib/X11/bitmap
 
Note: The default editor, /usr/dt/bin/dticon only exists if the Common Desktop Environment (CDE) is installed. It edits both bitmaps (monochrome images) and pixmaps (color images). The dticon command accepts bitmaps stored in either the X Pixmap Version 2 Enhanced (XPM2) format which was used by the X Desktop (xdt) application shipped in AIXwindows Version 1.2.5, or X Pixmap Version 3 (XPM3) - a new XPG3 compliant format used by CDE. However, it requires pixmap images be stored in the XPM3 format. CDE has documented tools that can convert pixmaps from the XPM2 to the XPM3 format.
 

The /usr/bin/X11/bitmap command is an unsupported sample program that accepts bitmaps in either the XPM2 or XPM3 formats. It does not support pixmap editing. Be sure that the Bitmap app-defaults file has been installed in the /usr/lib/X11/app-defaults directory before invoking the bitmap command. If not, issue the following command in the /usr/lpp/X11/Xamples/programs/bitmap directory:

xmkmf;
make install
 

The following object names (and their class names) can be used to customize this tool:

custom (Custom)
  startupDialog_popup (XmDialogShell)
     startupDialog (XmSelectionBox)
  helpDialog_popup (XmDialogShell)
     helpDialog (XmForm)
  saveDialog_popup (XmDialogShell)
     saveDialog (XmSelectionBox)
  colorEditor_popup (XmDialogShell)
     colorEditor (XibmColorEditor)
  fontEditor_popup (XmDialogShell)
     fontEditor (XibmFontEditor)
  pictureEditor_popup (XmDialogShell)
     pictureEditor (XibmPictureEditor)
  cursorEditor_popup (XmDialogShell)
     cursorEditor (XibmCursorEditor)
  selectmanyEditor_popup (XmDialogShell)
     selectmanyEditor (XibmSelectManyEditor)
  filenameEditor_popup (XmDialogShell)
     filenameEditor (XmFileSelectionBox)
  mainWindow (XmMainWindow)
     menubar (XmRowColumn)
     form (XmForm)
        appClassLabel (XmLabel)
        appClass (XmLabel)
        groupMenuLabel (XmLabel)
        groupMenu (XmRowColumn)
        scrolledGroup (XmScrolledWindow)
           scrolledGroupForm (XmForm)
               (XmLabelGadget)
               TypeField (XmTextField)
               TypeButton (XmPushButton)
 

where Type can be one of the color, font, picture, cursor, selectmany, filename, selectone, string, or number data type values.

Exit Status

This command returns the following exit values:

Item Description
0 Indicates successful completion.
>0 Indicates an error occurred.

Files

Item Description
/usr/bin/X11 Is the path from which you run the custom command once the custom package is installed.
/usr/lib/X11/app-custom Contains information about resources for individual applications.
/usr/lib/X11/locale/app-custom Contains information about resources for individual applications that is translated for specific locales.
/usr/lib/X11/app-defaults/Custom Contains default settings for the Customizing Tool.
/usr/lib/X11/locale/app-defaults/Custom Contains default settings for the Customizing Tool in locales that require special settings.