From the material covered so far, you've probably concluded correctly that CDE configuration files aren't something to go hacking at without a plan - a well-thought-out plan. You've probably figured out that the element you want to configure and the breadth of influence you want it to have determine which configuration file you modify. For instance, if you wanted to set an environment variable, you have a choice of four configuration files: sys.dtprofile, Xconfig, Xsession , and .dtprofile . But if you want to set environment variables that affect only a particular user , your choice immediately narrows to a single file, .dtprofile . Now the only remaining piece of the puzzle is to understand the order in which CDE reads its configuration files. When a configuration element (an environment variable, resource, action, or data type) is specified twice but with different values, you obviously want the correct value used and the incorrect value ignored. The following rules apply:
Table 14-4 illustrates which specification is used when CDE reads multiple specifications of configuration elements in its configuration files: Table 14-4. What CDE Uses for Configuration
Put in terms of scope, a user configuration file overrides a system-wide configuration file. Looking at the order of precedence of just system-wide configuration files, the files in /etc/dt have precedence over those in /usr/dt , so global custom configurations have precedence over the CDE default configuration. And $HOME/.dt files take precedence over those in /etc/dt. For resources, the elements used to specify a GUI's appearance and behavior, CDE sets values according to the following priorities:
Specific resource specifications take precedence over general resource specifications. For example, suppose that you want a certain font in your text entry areas. You could correctly specify a *FontList resource in your personal .Xdefaults file, only to have it overwritten by an *XmText*FontList in an app-defaults file. Although app-defaults is of lower priority than .Xdefaults , the resource specification set there is more specific, so it takes precedence. For environment variables, CDE sets values according to the following priorities:
For data type and action definitions, CDE looks for .dt files according to the following priority:
Remember that for data types or actions, the first value that it finds is the one it uses. So if you just can't get a file type or action to work, check for a duplicate entry earlier in the file or for an entry in a file with higher priority. Note also that the environment variable DTDATABASESEARCHPATH can be set either in /etc/dt/config/Xsession or $HOME/.dtprofile , to add directories where CDE can search for file type and action definition information. |