[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

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

-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. See the following table that lists the standard command-line options:

Option Resource Value Sets
-bg *background Next argument Background color
-background *background Next argument Background color
-bd (1) *borderColor Next argument Border color
-bordercolor (1) *borderColor Next argument Color of border
-bw .borderWidth Next argument Width of border in pixels
-borderWidth .borderWidth Next argument Width of border in pixels
-display .display Next argument Server to use
-fn (2) *font Next argument Font name
-font (2) *font Next argument Font name
-fg *foreground Next argument Foreground color
-foreground *foreground Next argument Foreground color
-geometry .geometry Next argument Size and position
-iconic .iconic On Start as an icon
-name .name Next argument Name of application
-reverse *reverseVideo On Reverse video
-rv *reverseVideo On Reverse video
+rv *reverseVideo Off No Reverse video
-selection- Timeout .selection- Timeout Next argument Selection timeout
-synchronous *synchronous On Synchronous debug mode
+synchronous *synchronous Off Synchronous debug mode
-title .title Next argument Title of application
-xrm value of argument Next argument Depends on argument
-xnllanguage .xnlLanguage Next argument Locale

1 These options often have no visible effect on AIXwindows applications if the AIXwindows Window Manager (mwm) is running.

2 Motif applications do not generally respond to these options.

Note: Resources beginning with an* (asterisk) set the resource of every widget in the application to the same value. Resources that begin with a . (period) set the resources of only the application's top-level Shell widget.

Parameters

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, enter the following:
    custom
  2. To start the customizing tool to modify the app-defaults file of the xcalc application, enter the following:
    custom -s 
    /usr/lib/X11/app-defaults/XCalc xcalc

Resources

The customizing tool has the following application resources:

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 unless you are using an Xstation with AIX Xstation Manager/6000 Version 1.3, then you need to set the value of this resource to /usr/lpp/x_st_mgr/bin/rgb.txt.
windowSearchDepth The customizing tool must determine the top-level shell window of the application. It starts with 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:

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

Files

/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.

Related Information

How to Start the Customizing Tool in AIX Version 4.3 AIXwindows Programming Guide.


[ Previous | Next | Contents | Glossary | Home | Search ]