|SAS Companion for UNIX Environments|
X clients usually have characteristics that can be customized; these properties are known as X resources. For example, X resources can be used to define a font, a background color, or a window size. The resources for an application, such as SAS, are placed in a resource database.
The SAS System functions correctly without any modifications to the resource database. However, you may want to change the default behavior or appearance of the interface. There are several ways to specify your customizations. Some methods modify all SAS sessions displayed on a particular X server. Some methods affect all SAS sessions run on a particular host. Other methods affect only a single SAS session.
The following sections describe how to customize the resource database. If you need more information on X Window System clients and X resources, refer to the documentation provided by your vendor.
|Specifying X Resources|
A resource specification has the following format:
SAS), the separator is a period (.) or asterisk (*) character, and the second identifer is the name of the specific resource. The value given may be a Boolean value (
False), a number, or a character string, depending on the resource type.
The application name and resource name can both specify an instance value or a class value. A specification for a class applies to a larger scope than a single instance.
The following are sample resource specifications:
SAS.startSessionManager: True SAS.maxWindowHeight: 100 SAS.awsResizePolicy: grow
Refer to your X Window System documentation for more information on resource specifications.
|Customizing SAS Resources|
The following list describes the methods that you can use to customize X resources.
sas -xrm 'SAS.confirmSASExit: False'
You can specify the -xrm option as many times as needed. You must specify the -xrm option for each resource.
Note: If you normally invoke the SAS System with a shell script, you should protect the quote characters from the shell with the backslash (\) character:
sasscript -xrm \'SAS.confirmSASExit: False\'
You can also add resources to the resource database
after SAS has initialized by running xrdb. For example, the following command
merges the definitions in the
myresources file into the resource database:
xrdb -merge myresources
app-defaults.) Set the environment variable XAPPLRESDIR to the pathname of this subdirectory. Specify the definition for the XAPPLRESDIR environment variable in the initialization file for your shell, for example, the
$HOME/.profilefiles, to ensure that the XAPPLRESDIR variable is defined for each shell that is started.
Create a file called
SAS in the subdirectory
identified by XAPPLRESDIR. Include your resource definitions in this file.
SASto contain your resource definitions, and store this file in the system
For more information on X resources, refer to the X Window System documentation supplied by your vendor or to other books on the X Window System.
|Setting X Resources through the Preferences Dialog Box|
The Preferences dialog box allows you to control the settings of certain X resources. Changes made through the Preferences dialog box (with the exception of those resources on the General tab) become effective immediately, and the settings are saved in SASUSERPREFS file in your SASUSER directory. You can invoke the Preferences dialog box by issuing the DLGPREF command or by selecting
Preferences Dialog Box
Start Session manager
If you select
Use Default Logo, SAS uses the default file for your site. If you select
No Logo, then no file is displayed.
If you select
Use Custom Logo, then you can either enter the XPM filename directly in the text field
or press [Select] to open the File Selection dialog box. This
check box sets the
Use application workspace
SAS.noAWSresource. You must exit and reopen the windows for changes to this resource to take effect.
AWS Resize Policy
This check box sets the
Use menu access keys
Save settings on exit
Use host printing
SAS.autoSaveIntervalresource) the documents that you currently have open. This check box sets the
Help & Documentation Browser - Netscape Path
Default paste buffer
This check box sets the
resource. See Controlling Pull-down Menus
for more information about cut-and-paste butters.
Automatically store selection
Overtypecheck boxes set the
The items on the Results tab affect only output that is produced through the Output Delivery System (ODS). For a complete description of ODS, refer to The Complete Guide to the SAS Output Delivery System.
Use WORK Folder
View results as they are generated
Password protect HTML file browsingis deselected. This check box sets the
Password protect HTML file browsing
View results as they are generatedis deselected. This check box sets the
The items in the ToolBox Window area of the Preferences dialog box affect both the toolbox and the command window.
Display tools window
Display command window
Auto Complete Commands
Save Commandsare selected, then SAS can automatically fill in commands that were entered in previous sessions. This check box sets the
commands.histin your SASUSER directory. If this check box is selected, then SAS will be able to automatically fill in (see
Auto Complete Commands) commands that were entered in previous sessions. This field sets the
Use arrow decorations
Always on top
The items in the Tools area affect the individual tools in the toolbox.
Use large tools
Use tip text
SAS.toolBoxTipDelayresource. You can enter a value directly into the field or use the arrows to the right of the field to change the value.
|Setting X Resources with the Resource Helper|
With Resource Helper, you can customize the key definitions and colors of SAS's interactive interface. Resource Helper creates SAS resource definitions and stores them in a location where the Resource Manager can find them. See How Resource Helper Searches For X Resources for a list of the locations that Resource Helper searches for resource definitions. Resource settings that are saved with Resource Helper will take effect the next time you start a SAS session.
You can start Resource Helper from within a SAS session
or from your shell prompt.
Start the SAS Resource Helper from a SAS window by entering
reshelperon the command line.
Main Window for Resource Helper
Resource Helper is installed into the
/utilities/bin subdirectory in the directory where SAS is installed (
!SASROOT). The name of the executable module is
reshelper. For example, if the SAS System is installed in
/usr/local/sas8, you start Resource Helper by typing
the following command:
If you run Resource Helper from a shell script, you
might need to set the XKEYSYMDB and XLOCALEDIR environment variables in order
for Resource Helper to work. XKEYSYMDB should contain the path to
/X11/resource_files/XKeysymDB in the
!SASROOT directory, and XLOCALEDIR should contain
the path to
/X11/resource_files/locale/ in that same directory. If SAS is installed in
/usr/local/sas8, then in the Bourne or Korn shells,
you can assign these environment variables as follows:
export XKEYSYMDB=\ /usr/local/sas8/X11/resource_files/XKeysymDB export XLOCALEDIR=\ /usr/local/sas8/X11/resource_files/locale/In the C shell, you can enter
setenv XKEYSYMDB \ /usr/local/sas8/X11/resource_files/XKeysymDB setenv XLOCALEDIR \ /usr/local/sas8/X11/resource_files/locale/
Resource Helper accepts the standard X Toolkit options.
Refer to the documentation provided by your X Window System vendor for a
list of these options.
In most cases, using Resource Helper is much easier and faster
than defining the resources yourself. However, the X Window System searches
for resources in several places, so it is possible for Resource Helper to
pick up the wrong key symbol for the key you are trying to define. If you
get unexpected results while using Resource Helper, you might need to define
your key resources yourself. See Defining Key Translations
for more information.
Start the Resource Helper (see Setting X Resources with the Resource Helper) and select the Keys icon.
Keys Window for Resource Helper
Key definitions are
divided into several
Move By Cursor
Move By Field
To define a key, follow these steps:
F12. If a default SAS translation has already been assigned to the key combination, Resource Helper displays the default translation.
Action Category. Resource Helper will display a list of actions in that category.
delete current field. Resource Helper can assign only one action to a translation. If the action that you select requires an argument (such as
sas-action-routine), Resource Helper prompts you for the argument.
Resource Helper displays the key combination and its new definition:
Note: If you select the sas-function-key action routine,
then the key definition is automatically displayed in the KEYS window. If
you choose another action routine and if you want the definition to appear
in the KEYS window, you will need to define a window label for the key. See Modifying the keysWindowLabels Resource for information
on defining labels in the KEYS window.
To modify a key
definition that is already in the
User-Defined Keys list, select the definition, select the left arrow
to remove the definition from the list, and edit the definition.
To delete a definition from
User-Defined Keys, select
it and select
[Clear] clears the key definition edit window.
[Default Defined Keys...] displays the
default key definitions for your system.
Start Resource Helper and select the Colors icon.
Colors Window for Resource Helper
You can modify the color of part of a SAS window as follows:
Customize Colors Window for Resource Helper
You can customize a color by
The result is displayed in the
Sample Window. The hex value of the color is displayed at the bottom of the window.
For example, double-click on
Red in the
Change Red from: displays the
currently used by SAS windowing environment. Click on
Aliases and observe the change in the
display. Move the
sliders with your mouse button and note the changes in the color of the
To: display. Click on
Apply and note the difference
in the color displayed as
Red in the
Colors window. Select [OK] to save your changes.
You can also change the attributes of some categories
of SAS windows.
Attributes allows you to select
Select [Defaults] to restore your color settings to their default values. Select [OK] to exit the Colors window after you have finished defining your color settings. To save your color settings permanently, from the Resource Helper pull-down menus, select
The following list describes the locations where the Resource Helper searches for resource definitions and the order in which it searches these locations.
~/.Xdefaults-hostname file, where hostname is the name of the machine on which Resource Helper is running.
To determine if any resources have been defined in your RESOURCE_MANAGER property, issue the following command:
xrdb -q | moreIf no listing is returned, the RESOURCE_MANAGER property does not exist. In this case, Resource Helper loads the resources defined in the
You can use
%N to substitute an application
class name for a file when specifying the XUSERFILESEARCHPATH environment
variable. For example, to point to
the location of all the resources for any application, issue the following
command in the Bourne or Korn shells:
export XUSERFILESEARCHPATH=\ /usr/local/resources/%N
In the C shell, the command is
setenv XUSERFILESEARCHPATH \ /usr/local/resources/%N
As a result, when SAS is invoked, the file pointed to by XUSERFILESEARCHPATH is
SASis the application class name for SAS.
export XAPPLRESDIR=/usr/local/app-defaultsat the next invocation of SAS, the application's class name is appended to the path:
In the C shell, the command is
setenv XAPPLRESDIR /usr/local/app-defaults
Note: To determine if an environment variable has been set, you can issue the following command:
/usr/lib/X11/app-defaults. Resource Helper does not need to have write access to this file, but it must be able to read the file and add the SAS resources to a writable resource file. Resource Helper does not generate a warning message if the file is not present or if it cannot read the file.
Except for the
/usr/lib/X11/app-defaults file, Resource Helper trys to write the new
resources to the same directory and file where it first found SAS resources.
This location must be a writable file in a writable directory. If Resource
Helper cannot write to the file, the SAS resources in that file will remain
in effect and any new or modified resources generated by Resource Helper will
not take effect. If this happens, Resource Helper displays an error dialog
box that contains the file or directory and suggests a way to fix the problem.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.