Navigational location:
[login]--->[start]---> [package management]-\ /-->[program execution] | | | |----> [project management]-+->+-->[file view] | | | |----> [pool management]----/ \-->[directory browser] | |----> [CONFIGURATION] | \----> [help] directory context needed
Elego ComPact is organized as a set of programs with a rich command line interface which can also be called from a graphical shell realized by the ComPactHTTPd server. These programs need a huge amount of information of various kinds which depends on installation specifics, project and company conventions, user preferences etc. These information is supplied to all programs in form of so-called resources, which are basically arbitrary data files that are located according to a resource path. Additionally, a default version of every needed resource is bundled with all the programs, which means that the needed data is compiled into the executable file. This bundled resource is always used as the last fallback in case no customized version was found in any directory mentioned in the resource path.
The search path for most of the resources is defined by the configuration variable configpath. The ComPactHTTPd uses the variable httpd-resources to locate its HTML and GIF resources.
What resource files exist for what purpose is explained in detail in Section 10.2. We will now discuss the process of program initialization performed by the ComPact tools.
At startup, every program looks for one of the global configuration files ~/.compactrc or ~/compact/compactrc. This file contains bindings for global configuration values as well as mapping statements, which define selective bindings of configuration values based on regular expressions. For the details of syntax and semantics of this file see Section A.1 in Elego ComPact Manual Appendices. For our current purpose it is enough to know that the definitions of this file build the root of the initialization prcedure of all ComPact tools. If the compactrc resource is not found in the home directory of the user, it is searched in one of the following directories in sequence:
| /usr/contrib/lib/compact |
| /usr/local/lib/compact |
| /opt/compact |
As most of the variables defined by this global configuration file should easily be accessible from the graphical user interface, and we don't like much the automatic modification of user's configuration resources, ComPact uses an override file named ~/.compact-env-rc or ~/compact/compact-env-rc (next to the compactrc file) whose definitions supercede those of the compactrc file. This file is written by the ComPactHTTPd and should usually not be edited manually, except for the removal of unwanted entries. Every ComPact program issues a warning for each variable definition that is different in the compactrc and compact-env-rc file. You should adopt one of the following policies for configuration and customization of ComPact programs:
Only use the compactrc resource and never let ComPactHTTPd write a compact-env-rc file. You must edit the compactrc file with your favourite editor, save it and reinitialize the sessions of ComPactHTTPd in order for the changes to take effect.
Capture the state of your configuration in a compact-env-rc file and remove the compactrc file. Every time you save this file from the ComPactHTTPd generated GUI, the current session is reinitialized, so that all sensible changes should take effect.
You should distinguish between a set of variables (and mappings) defined in the compactrc and changed by editing this file, and another set of variables in compact-env-rc which are only changed via the graphical user interface. You can define the latter set with the value of the configuration variable env-file-settings, which contains a list of those variable names saved in the compact-env-rc file. This is the most flexible way affords much more care from the user.
You should remember that you may savely delete the compact-env-rc if you have a working compactrc still residing in your home directory, so you may try soem changes from the graphical user interface and later discard them by removing the said file.
According to the distinction between editing complete configuration resource files and just changing certain values via text input fields from the graphical user interface, the configuration page of ComPact contains two regions: the dir1 (5), dir2 (6), and dir3 (7) frames are used for selection, viewing, and editing of complete resource files, while the command group menu (8) and command frame (9) are used to seletively change values. Most of the changes made in the latter panes take effect only after saving the compact-env-rc file and reinitializing the sessions of ComPactHTTPd.