SourceForge Logo

Go to the SourceForge project home page








Using the config file

Go to documentation index

Table of contents

[This section is only relevant for UNIX users.]

HeavyMole uses a config file at run time to find paths to some directories. This file is called "heavymole.cfg" and need to be updated only if you want to change the default directories.

A. What does "heavymole.cfg" contain?

It is separated in two categories:

  • system paths: those paths are for data like default central servers data file ("HMDDATA"), languages of the application or pixmaps and skins for the graphical interface. As there are currently no functionalities about that, you should not change the contents of these paths (except the "HMDDATA" file if you set up a private network).
  • user paths: these are the paths where users data are stored.
    • USER_BASE_PATH: where the log file is stored
    • USER_DATA_PATH: directory where all users data needed by the application are stored
    • USER_DEFAULT_DOWNLOAD_PATH: default download path that is used when a new user is created

B. Launch sequence: finding the config file

First thing HeavyMole does at launch time is to search for a config file. It searches in following order:

  • specified file if it has been launched with the "-c <filename>" option
  • current working directory
  • $HEAVYMOLE_HOME directory if this environment variable is set
  • $HOME directory
  • /etc directory

You can see details about config file search by launching it with the "-v" option.

The program checks each file found to see if all seven entries are present and stops whenever it finds a complete file.
If no "HMDDATA" file can be found in the SYSTEM_DATA_PATH or in the USER_DATA_PATH, it generates a warning.
If it finds no config files, the application will use default values.

C. How to use config files

  • if you are root: you can modify the file in /etc so that each user can use the good paths
  • if you are a non-privileged user:
    • if you want to use a precise file, cd into the same directory and launch HeavyMole (useful when testing to use local data)
    • if you want to launch HeavyMole from anywhere on your machine:
      • do not change anything: it will use the config file /etc/heavymole.cfg
      • you can set up an environment variable $HEAVYMOLE_HOME to the directory containing your own heavymole.cfg (eg add the line "export HEAVYMOLE_HOME=(path to dir)" in .bashrc)
      • you can simply put your own heavymole.cfg in your home directory
      • you can also run heavymole with -c option
      • ...

D. What about if I loose all my config files

The application will use default values.
However, all config files contained in the package are:

  • the local one in the main "heavymole" directory, not copied by "make install"
  • the default one in "heavymole/data" which is copied by "make install" to "/etc"
  • two backup copies ("heavymole-local.cfg" and "heavymole-default.cfg") in the "heavymole/src" directory of the tarball. - This page was last updated on November, 5th 2003