This page describes the policy handling in the HEPiX X11 scripts. It can be seen
as a detailed description of the behaviour of the program apply_policy
.
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
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.
In addition to the policy handling described above, some validity checks are performed. For instance:
/usr/local/lib/hepix/X11/hep/HEP_desktop.value
and must be possible on the machine; this is done by running
HEP_desktop.value -check
that will look for
some hard-coded prerequisites that must be fullfiled, e.g.
/usr/dt/bin/dtsession
must be executable for CDE
local-client
;
otherwise, WM must be executable or in the $PATH
Finally, some consistency or interdependency checks are performed. For instance:
Lionel Cons, 8-Jan-1997