Previous Topic     Contents  

Resources File


LicenseKey     |     Configuration Settings     |     Start Up Commands     |     Appearance Settings     |     Menu Settings     |     Resource File Location(s)

The Resources File controls the appearance of the interface. It also contains a number of configuration settings. The user is free to modify the file to customize Sabrina; it would be prudent to keep a copy of the original Resources file as distributed by White Rock Science.

! is the comment character. The order of the resources does not matter beyond ease of finding a particular item.

LicenseKey

The only resource that is absolutely required is the 66 character LicenseKey:

!   License Key
Sabrina*LicenseKey:	f7d829 ... d521b
Although the other resources may be blown away, the resulting interface will be a mess.

Configuration Settings

Configuration settings include those for Help and for Popup Tips, the location of the sabrina.ini initialization file, and color map parameters.

Start Up Commands

In olden days, when Studebakers roamed the highways and CBs ruled the airwaves, Sabrina read startup commands from the .sabrinarc file. Those commands, that can be used to set user preferences, are now specified in the Resources File.

The NumRCCommands resource specifies the number of initialization commands to read. If the resource is absent, or nonpositive, no commands will be used.


!	Sabrina Commands

!	The Number that will be used MUST be specified
!	(any greater than the Number are ignored)
Sabrina*NumRCCommands:		3
Each RCCommandN is a Sabrina text-based command. Sabrina searches for these resources from N = 0 to N = NumRCCommand. If one of the resources in the range is not found, the corresponding command is not issued. The numbers have nothing to do with the order in which the RCCommandN resources appear. Resources with N > NumRCCommand are ignored.

!	Use a unique number for each command
Sabrina*RCCommand0:	write/reuse
Sabrina*RCCommand1:	post/color
Sabrina*RCCommand2:	fx player 'playaiff /usr/lib/sounds/prosonus/'
Sabrina*RCCommand3:	fx error 'sfx/frog.aiff'

Appearance Settings

Standard XWindow Resource statements specify color, fonts, button labels, and dialog titles. Available color names are defined in /usr/lib/X11/rgb.txt or similar system file.

Resources for the Question and Message boxes, File Selection Boxes, and various Sabrina Windows appear first, followed by resources for dialogs.

Menu Settings

Menu resources---Lables, Mnemonics, and Accelerators---are at the bottom of the Resources file following:

!      Menu Entries
The resources following

!       Menu Entries for Text-Based Help
are for the menu at the top of the Help Window when using text-based help.

Resource File Location(s)

The location of the Resources file can be specified with the -X command line option. A convenient method of ensuring Sabrina will always pick up the desired file is to create an alias to Sabrina in the shell startup script. For a csh, .cshrc would contain a line like

alias sabrina /SabrinaDir/sabrina -x /home/Joe/Sabrina/Resources

Lacking an explicit location given on the command line, there are at least 8 locations from which Resources can be read; consult an XWindow reference for a complete list. The following locations are listed in order of loading. Resources loaded last will override any previously loaded. A resource specified in $HOME/.Xdefaults, for example, will take precedence over the same resource in /usr/lib/X11/app-defaults/Sabrina.

The directory /usr/lib/X11/app-defaults contains system-wide resource files (the lib/X11 directory location may vary with vendor). To provide global Sabrina resources, copy Resources to /usr/lib/X11/app-defaults/Sabrina and change permissions to allow anyone read access.

The file $HOME/.Xdefaults contains user-specific resources. Resources from the Sabrina Resources may be copied to this file.

If the environment variable $XENVIRONMENT is defined, the file specified by the variable is loaded. If the variable is not defined, and if Resources exists in the local directory, that file is loaded.

Resources may be specified on the command line---consult an XWindow reference.