Client.cfg

From FaHWiki
Jump to: navigation, search

Contents

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.


Operating System line endings
Operating System Line Ending Character(s) Hexadecimal Regular Expression
*nix Line Feed <LF> 0x0A \n
Windows Carriage Return Line Feed <CR><LF> 0x0D 0x0A \r\n
Macintosh Carriage Return <CR> 0x0D \r


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 [graphics].
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 ([section]), and individual settings in name equals value format (name=value).
Each section is ended with an empty line.


When running FAH504-Linux.exe -configonly and accepting the default values, the client.cfg has the contents as depicted below.

[settings]
username=Anonymous
team=0
asknet=no
machineid=1

[http]
active=no
host=localhost
port=8080


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 ('\0') 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:

  • 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


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


Section: [settings]

S: username=Anonymous
O: User name [Anonymous]?

S: team=0
O: Team Number [0]?

S: asknet=no
O: Ask before fetching/sending work (no/yes) [no]?

S: bigpackets=yes
O: Allow receipt of work assignments and return of work results greater than
    5MB in size (such work units may have large memory demands) (no/yes) [yes]?
N: Featured changed to (small/normal/big) in v6.x client. (<5MB, 5-10MB, >10MB)

S: machineid=1
O: Machine ID (1-8) [1]?
N: Featured changed to (1-16) in the v6.x client.

S: local=213
N: This is not actually a configuration setting, this is the value of completed Work Units
   which the client reports in the FAHlog.txt file as:
   [20:58:03] + Number of Units Completed: 213 


Section: [http]

S: active=yes
O: Use proxy (yes/no) [yes]?

S: host=localhost
O: Proxy Name [localhost]?

S: port=8080
O: Proxy Port [8080]?

S: usepasswd=yes
O: Use username & password with proxy [yes]?

S: proxy_name=pu
O: Proxy Username [pu]?

S: proxy_passwd=ÔÔ®
O: Proxy Password? pp

S: usereg=yes
O: Use Internet Explorer Settings (no/yes) [yes]?
N: This option is not available in the Linux client.  
N: In early 2007, Microsoft released OS and browser security patches 
   that interfered with this setting. Do not use this setting. 
N: This option has been removed from v6.x client. If needed, 
   use the proxy option instead.


Section: [graphics] (Windows Graphical client only)

S: subtitle=Distributed Computing    -    http://folding.stanford.edu
O: Extra text to display alongside the main title (eg, companyname)

S: drawgap=7500
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                        ^
S: drawgap=681
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                           ^
S: drawgap=357
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                              ^
S: drawgap=241
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                 ^
S: drawgap=182
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                    ^
S: drawgap=147
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                       ^
S: drawgap=122
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                          ^
S: drawgap=105
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                             ^
S: drawgap=92
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                                ^
S: drawgap=82
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                                   ^
S: drawgap=75
O: Molecule Draw Rate:  |  |  |  |  |  |  |  |  |  |  |
                                                      ^
S: drawtitle=1
O: [x] Main title enabled

S: drawtitle=0
O: [ ] Main title enabled

S: saver_mode_enabled=1
O: [x] Turn on screensaver after ........ minutes

S: saver_mode_enabled=0
O: [ ] Turn on screensaver after ........ minutes

S: saver_runs_core=0
O: [ ] Run Core only when screensaver is active (will reduce productivity)

S: saver_runs_core=1
O: [x] Run Core only when screensaver is active (will reduce productivity)

S: saver_idle_minutes=5
O: [ ] Turn on screensaver after 5 minutes

S: drawlogos=0
O: [ ] Logos enabled

S: drawlogos=1
O: [x] Logos enabled

S: logourl=http://example.com/logo.jpg
O: URL log should like to:
   [http://example.com/logo.jpg  ]

S: logopath=C:\tmp\logo.jpg
O: Selected logo: C:\tmp\logo.jpg
N: You have to select this image by hitting the "Choose new logo" button and browse for the image you want

S: drawmode=2
0: Visualization type: Ball & Stick

S: drawmode=1
0: Visualization type: Spacefill

S: drawmode=0
0: Visualization type: Random


Section: [power] (Windows clients only)

S: battery=yes
O: Pause if battery power is being used (useful for laptops) (no/yes) [yes]?


Section: [core]

S: priority=0
O: Core Priority (idle/low) [idle]?

S: priority=96
O: Core Priority (idle/low) [low]?

S: cpuusage=50
O: CPU usage requested (5-100) [50]?
N: Only available on Windows

S: disableassembly=yes
O: Disable highly optimized assembly code (no/yes) [yes]?
N: Enabling this setting will significantly slow down the speed of the client.

S: checkpoint=30
O: Interval, in minutes, between checkpoints (3-30) [30]?

S: ignoredeadlines=yes
O: Ignore any deadline information (mainly useful if
    system clock frequently has errors) (no/yes) [no]? yes


Section: [clienttype]

S: memory=512
O: Memory, in MB, to indicate (1774 available) [512]

S: type=0
O: Request work units without deadlines (no-pref/no/yes) [no-pref]?
O: Set -advmethods flag always, requesting new advanced
     scientific cores and/or work units if available (no/yes) [no]?
N: This is the default value, it is assumed if no type is defined.

S: type=1
O: Request work units without deadlines (no-pref/no/yes) [no]?

S: type=2
O: Request work units without deadlines (no/yes) [yes]?

S: type=3
O: Request work units without deadlines (no/yes) [no]?
O: Set -advmethods flag always, requesting new advanced
     scientific cores and/or work units if available (no/yes) [yes]
N: This is option was added in client v5.04.

S: nonet=yes
O: Request work units without deadlines (no/yes) [yes]?
O: Minimize networking -- get and submit work in batches (no/yes) [yes]?
N: Deadlineless workunits have been discontinued.  Using these options will cause the client not to download new workunits.


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".


Options

User name [Anonymous]?
Team Number [0]?
Ask before fetching/sending work (no/yes) [no]? yes
Use proxy (yes/no) [no]? yes
Proxy Name [localhost]?
Proxy Port [8080]?
Use username & password with proxy (yes/no)? yes
Proxy Username? pu
Proxy Password? pp
Allow receipt of work assignments and return of work results greater than
 5MB in size (such work units may have large memory demands) (no/yes) [no]? yes
Change advanced options (yes/no) [no]? yes
Core Priority (idle/low) [idle]? low
Disable highly optimized assembly code (no/yes) [no]? yes
Interval, in minutes, between checkpoints (3-30) [15]? 30
Memory, in MB, to indicate (1774 available) [1774]? 512
Request work units without deadlines (no/yes) [no]? yes
Minimize networking -- get and submit work in batches (no/yes) [no]? yes
Ignore any deadline information (mainly useful if
 system clock frequently has errors) (no/yes) [no]? yes


client.cfg

[settings]
username=Anonymous
team=0
asknet=yes
bigpackets=yes
machineid=1

[http]
active=yes
host=localhost
port=8080
usepasswd=yes
proxy_name=pu
proxy_passwd=ÔÔ®

[core]
priority=96
disableassembly=yes
checkpoint=30
ignoredeadlines=yes

[clienttype]
memory=512
type=2
nonet=yes


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"


Options

User name [Anonymous]?
Team Number [0]?
Ask before fetching/sending work (no/yes) [no]?
Use proxy (yes/no) [no]?
Allow receipt of work assignments and return of work results greater than
 5MB in size (such work units may have large memory demands) (no/yes) [no]?
Change advanced options (yes/no) [no]? yes
Core Priority (idle/low) [idle]?
Disable highly optimized assembly code (no/yes) [no]?
Interval, in minutes, between checkpoints (3-30) [15]?
Memory, in MB, to indicate (1774 available) [1774]?
Request work units without deadlines (no/yes) [no]?
Set -advmethods flag always, requesting new advanced
  scientific cores and/or work units if available (no/yes) [no]? yes
Ignore any deadline information (mainly useful if
 system clock frequently has errors) (no/yes) [no]?
Machine ID (1-8) [1]?


client.cfg

[settings]
username=Anonymous
team=0
asknet=no
machineid=1

[http]
active=no
host=localhost
port=8080

[clienttype]
type=3


Scenario C: Change from Scenario B back to defaults

Options

User name [Anonymous]?
Team Number [0]?
Ask before fetching/sending work (no/yes) [no]?
Use proxy (yes/no) [no]?
Allow receipt of work assignments and return of work results greater than
 5MB in size (such work units may have large memory demands) (no/yes) [no]?
Change advanced options (yes/no) [no]? yes
Core Priority (idle/low) [idle]?
Disable highly optimized assembly code (no/yes) [no]?
Interval, in minutes, between checkpoints (3-30) [15]?
Memory, in MB, to indicate (1774 available) [1774]?
Request work units without deadlines (no/yes) [no]?
Set -advmethods flag always, requesting new advanced
  scientific cores and/or work units if available (no/yes) [yes]? no
Ignore any deadline information (mainly useful if
 system clock frequently has errors) (no/yes) [no]?
Machine ID (1-8) [1]?


client.cfg

[settings]
username=Anonymous
team=0
asknet=no
machineid=1

[http]
active=no
host=localhost
port=8080

[clienttype]
type=0


Links

Personal tools