Wednesday, 23 January 2008

Setting Folding@Home to run on boot up

On Linux Folding@Home doesn't run manually when you boot up your computer. One way around this is to install it as a service. This will make Folding@Home start up in the background every time your computer boots.

To begin download the Folding@Home client. Once downloaded you will need to extract the contents. The best way to do this is to create a folder somewhere and extract there. I created a folder called folding in my /etc directory:
sudo cp -r folding /etc/folding
Once you have extracted all the files make the Folding@Home client executable with the following command:
sudo chmod a+x /etc/folding/fah
Now run the client manually and enter your user details when prompted. Once you have the client set up and running successfully, exit out by pressing ctrl+c:
cd /etc/folding sudo /etc/folding/fah6
Now that you have Folding@Home set up you can create a bash file which will run the client. This script will be used to start Folding@Home for you at boot. Create a text file containing the following code and save it as /etc/init.d/folding:


cd /etc/folding/
./fah6 >> /tmp/folding@home 2>&1 &

Make this bash script you just created executable by typing:
sudo chmod a+x /etc/init.d/folding
Finally you need to add Folding@Home as a service. To do this type the following command:
sudo update-rc.d folding defaults
This command adds the bash script you just created to the system's startup scripts. So now when you boot up, Folding@Home will start, and when you shut down Folding@Home is stopped.

To check the status of Folding@Home at any time you can check the log:
tail -f /tmp/folding@home
Since the log is placed in /tmp it will be removed every time you reboot so you don’t need to worry about it filling up disk space

No comments:

Post a Comment