Installing and Running the client manually

Get the client from, save it to some directory (you will want to make one specifically for F@H, because it makes a bunch of files), and run it. The trouble is, you need to start it by hand. But once you have your startup routine perfected, you can automatically run the client at login if you do not want other users responsible for starting and/or monitoring the Folding@Home client.

Say you put it in $HOME/foldingathome. Then to start it, you may want to use

cd $HOME/foldingathome
(exec fah5 >& /dev/null &)

You must run the client from its directory, since it always looks for files in the current directory (and creates them if they do not exist). The parentheses fork a new shell, the exec replaces the new shell process with the client (not strictly necessary), the redirect suppresses output, and the ampersand puts the process into the background. This all means you can safely close the terminal after starting the client this way.

There are more options that can be added once you have the client running smoothly. Learning the meaning and use of flags passed to the client at startup can aid in increasing your production. See this guide list for references showing all possible flags or parameters that can be passed to the Linux client at startup.

Running the Client From the Startup Applications Menu

First, create a short shell script (using gedit or nano) to start your client with the eventual objective of automatically starting the client when you log onto your account. For this example the script is in the user's home folder and the folding@home client directory is named fah. Here is another example of a script that starts the client from the home directory, but you'll be presented the option of running it (when accessing the file via nautilus) in a terminal window or just running the process completely in the background when double-clicking the script or highlighting it and pressing enter.

cd fah
./fah6 -smp 4 -verbosity 9


Fig. This is the dialog seen after double-clicking a script

IMPORTANT: If you use this particular script and leave the terminal window open, go to the terminal window and use "ctrl-c" to properly shut down the client before restarting or shutting down Linux. If the folding client core does not shut down properly, you will loose SSE, 3Dnow, etc. instruction enhancements until the work unit concludes unless you intervene with the -forceasm flag. That is something that should be done sparingly, and only if you know why core shutdown was improper.

Once you have created your script, give it the name of your choosing and use chmod to make it executable.

The flag -smp 4 indicates that this is a four core/thread processor and can use them simultaneously on one job. The second, -verbosity 9, indicates the client should output at maximum for close monitoring of the process. These units progress rapidly on a quad-core CPU. On a high performance machine, it is helpful to know what impacts performance. Close monitoring of the terminal window and use of System Monitor provide clues when there is a negative impact on performance.

The second step is to start the client automatically when logging into a Gnome session. In Ubuntu, this is quite easy. Under the System menu select Preferences, then Startup Applications. Click the +Add button. For name put something that accurately identifies the process, such as "Start F@H Client." For command put

/usr/bin/gnome-terminal --command ./scriptname

where scriptname is the actual name of your script. This way the client will start when you you log into a Gnome session. You will still get a terminal window for your client, but you can logout, shut down or restart without needing to think about your Folding@Home client becuase it is now running as a service. It will shut down its processes properly without intervention. But you also have the flexibility to stop the client just by closing the terminal window or striking "ctrl-c" with the terminal window in the foreground focus.


Finally, if you do not wish to have a terminal window open just use your script (./scriptname) for your command.

FoldingAtHome/ManualInstall (last edited 2009-12-27 15:36:08 by djchandler)