Customizing the Panorama (xdt3) Desktop with rules

Specifying the scope explicitly

For icon_rules clauses, you specify the scope of the rule explicitly by providing a specification that matches the files or directories in which you are interested.

The format of the icon_rules clause is:

      pattern [/class]
         clauses applying to specified files

The specification consists of two parts:

See also:


Patterns look like filenames or pathnames, but can contain certain special characters or wildcards. There must be at least one space or newline before specifying a class.

The basename of a pattern can include the following wildcard characters:

any single character. For example, a?c includes the files aac, abc and so forth, but not the file abbc.

any sequence of characters, including none. For example, a*c includes the files ac, abc, acbc and so forth.

any one of the specified set of characters. For example, [abc]d includes the files ad, bd and cd but no others.

none of the specified characters. For example, [!a]bc includes bbc, cbc and so forth, but not abc.
These patterns can be combined. For example, [!A]* means any file beginning with a character other than A.

See also:

Relative patterns

If the pattern does not begin with a ``/'', it is a ``relative pattern'', which can match files anywhere in the system. The pattern cannot include ``/''.

Rules following relative patterns in a local rule file apply to files in the directory that match the pattern. Rules following relative patterns in all other rule files apply to all files whose basenames match the pattern.

Absolute patterns

If the pattern begins with a ``/'', it is an ``absolute pattern'', which only matches files in a specific directory.

Absolute patterns cannot occur in local rule files. Wildcards can only be included after the last ``/'' in an absolute pattern.

Rules following absolute patterns apply to files in the directory given by the pattern up to the last ``/'', and whose basename matches the part after the last ``/''. These rules take precedence over those following relative patterns in any rule file.


Classes are used to represent the properties of files in a concise form. These properties fall into the following six sets:

A file has one property from each set. The properties are each represented by a character, so that the class of a file consists of exactly six characters. The Desktop always specifies classes in upper case, though it accepts classes in either case. For example, an executable file might have the full class definition:

The classes restrict the group of files affected by the subsequent clauses, and so omitting a specifier from one set of options will match all the alternatives.

The following examples show some of the most useful class specifications:




executable files

files executable by the user

data files

data files that the user can alter

data files that the user can read

See also:

Next topic: Effect of rules in different rule files
Previous topic: Changing behavior dynamically

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005