HEPiX X11 Scripts - Policy

This page describes the policy handling in the %hx. It can be seen as a detailed description of the behaviour of the program %apply_policy.


The policy file

The policy can be defined by creating a file named %xpolicy at any level (hep to user). The format is the following:

The switch is a name of some major switches (without the leading `HX_'), currently: `DESKTOP', `LAST_CLIENT', `SOURCEPROFILE', `STARTUP', 'START_MXCONNS' or `WM'.

The action can be:

Here is an example of syntax:

# the default window manager is fvwm
WM/default: fvwm
# the CDE and HP-VUE desktops are forbidden
DESKTOP/forbid:
   CDE
   HP-VUE
# HX_SOURCEPROFILE can be only YES or NO
SOURCEPROFILE/allow: YES
   NO

Algorithm

All the policies "merged":

This "merging process" goes from hep to user level and stops if a bogus policy (no possible value) is found. For instance, for the DESKTOP switch, if hep forbids CDE and HP-VUE, site allows only CDE and DXSESSION and group allows only CDE, the final policy will be to allow only DXSESSION...

When the final policy is obtained, the next step if to find a good value. This is done by trying in order the value of HX_switch set in the %xprofile files (if any) and all the defaults given in the %xpolicy files, from user to hep level, in order. If no suitable default is found, the list of allowed values is used and, if everything else fails, a hard-coded default is used.

Validity Checks

In addition to the policy handling described above, some validity checks are performed. For instance:

Consistency Checks

Finally, some consistency or interdependency checks are performed. For instance:


Lionel Cons, 8-Jan-1997