Client.cfg

General
The file client.cfg stores the configuration of the F@H client.

It looks like an ordinary ASCII text file, but the client actually reads it as a binary file. Therefore do not attempt to manually edit the file. The client, for instance, expects the file to use UNIX line endings.

The Graphical Folding@Home client for Windows stores much more information in the client.cfg than the "No nonsense" text-only console client in the additional section. Also only available to Windows clients, either the Console of Graphical client, is the option to disable execution of the client if the computer is running on battery power.

The information on this page reflects the Linux client v5.04, the Windows console client v5.04 and the Windows Graphical client v5.03. The v6 client uses a slightly extended client.cfg documented on: FAH6_Client.cfg

Format
Its format appears to be that of an .ini file. With sections in square brackets, and individual settings in name equals value format. Each section is ended with an empty line.

When running  and accepting the default values, the client.cfg has the contents as depicted below.

Behaviour
It appears that the client only writes settings in client.cfg if they are changed from their defaults. The default values proposed by the configuration menu are loaded from the existing client.cfg if the file is readable, or from preprogrammed values inside the program if no client.cfg is available.

If the proxy password is set, it appears to be encrypted. Even if the password is empty, there is a value for the setting. This value is always the last character for every password string, so this is probably the terminating NULL character in a C string.

If you were to go through the advanced options but don't change any of the defaults, the resulting client.cfg is the same as if you would have skipped the advanced options.

Invalid content in the client.cfg results in the file being overwritten with default values, i.e. no user name or team #.

Editing the client.cfg
The client.cfg file is not a text file in a regular sense, it's actually a UNIX text file which the client reads as a binary as mentioned above. It should therefore also be treated as a binary file.

DO NOT manually modify the client.cfg. Make all changes using the FAH client configuration. (see -config and -configonly flags). Manual modification of any F@h client files is against the EULA. And as noted above, if you make a mistake, it can cause points for completed work to be credited to a user name other than yours.

Here is what Dick Howell, the author of qd, and Adam Beberg, the author of Cosm, had to say about the client.cfg:

The client.cfg file is not really a text. It is managed by the Cosm package, which is used by the client as an aid to machine-independence. You've got the right idea with the newlines. The routines which handle the config file are fairly picky about the format, expecting that it will only be manipulated by the client itself, when it is first started or later run with the -config flag. Here is what Adam Beberg, who wrote Cosm, says about it in the header file for the config file functions: The Rules: o These are binary files, not text. You're not supposed to have to edit them. o Config files contain ascii, not unicode. o No linefeeds (\n) in section/keys/values - those are line separators. o No '=' or '[' in keys, and avoid ']'. o Everything is case sensitive. o Blank lines are ignored, but added at the end of sections for humans. o Any improperly formatted line is discarded. o Comment lines don't exist, that's what documentation is for. o The majority of cases the config will only be read, so optimize for reading.

See also: Cosm API - Program Config File Functions

Which option changes what client.cfg setting
Legend: If there are more O lines below a single S line, it means that all those options are required to set that value in client.cfg
 * S: The setting in client.cfg
 * O: The option in the -configonly menu or the label in the Graphical client
 * N: A note on the circumstances needed for this value of the setting

Configuration Scenarios and their client.cfg files
These scenarios have been done with the Linux v5.04 console client. The Windows client has an extra option to disable execution if running on battery power. Everything else is mostly identical between the clients.

Scenario A: Change every option.
This includes setting the option for deadlineless units. By only requesting Work Units without deadlines you cannot set the option "Set -advmethods flag always, requesting new advanced scientific cores and/or work units if available".

Scenario B: Only enable "Set -advmethods flag always ..."
Only enable "Set -advmethods flag always, requesting new advanced scientific cores and/or work units if available"

Links