FAH6 Client.cfg

From FaHWiki

Jump to: navigation, search

Contents

General

The file client.cfg stores the configuration of the F@H client. It was first documented on this wiki on Client.cfg for the v5 F@H client. This page documents the client.cfg generated by the v6 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 information on this page reflects the Linux client v6.23 Beta R1.


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 ./fah6 -configonly and accepting the default values, the client.cfg has the contents as depicted below.

[settings]
username=Anonymous
team=0
passkey=
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 used to appear to be encrypted with the v5 client, now its stored clear text.

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

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

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

[core]
addr=

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: machineid=1
O: Machine ID (1-16) [1]?
N: Featured changed from (1-8) in the v5.x client.

S: bigpackets=big
O: Acceptable size of work assignment and work result packets (bigger units
    may have large memory demands) -- 'small' is <5MB, 'normal' is <10MB, and
    'big' is >10MB (small/normal/big) [normal]? big
N: Featured changed from Allow WUs >5MB (no/yes) in v5.x client.

S: extra_parms=-verbosity 9
O: Additional client parameters []? -verbosity 9

S: local=42
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:
   [00:12:34] + Number of Units Completed: 42 


Section: [http]

S: active=yes
O: Use proxy (yes/no) [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/no)? yes

S: proxy_name=pu
O: Proxy Username? pu

S: proxy_passwd=pp
O: Proxy Password? pp


Section: [core]

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

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

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

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

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

S: nocpulock=1
O: Disable CPU affinity lock (no/yes) [no]? yes

S: addr=127.0.0.1
O: IP address to bind core to (for viewer) []? 127.0.0.1


Section: [clienttype]

S: memory=1024
O: Memory, in MB, to indicate (2014 available) [2014]? 1024

S: type=0
O: Set -advmethods flag always, requesting new advanced
     scientific cores and/or work units if available (no/yes) [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]?
N: This option was removed in the v6 client

S: type=2
O: Request work units without deadlines (no/yes) [yes]?
N: This option was removed in the v6 client

S: type=3
O: Set -advmethods flag always, requesting new advanced
     scientific cores and/or work units if available (no/yes) [no]? yes


Links

Personal tools