Introduction, apology and how i learned to stop worrying and love the command line (You can skip this and move to page 2 if you want).

There are many Mac users out there who are afraid of the command line (CL). I know this, because generally, i'm one of them; and i also spend way too much time browsing Apple related websites where people seem to be quite bitter about using it. Mostly it has a lot to do with being afraid that we might totally erase our hard drives by giving the wrong unix instruction within the terminal (can you say iTunes 2.0); and it's not so much that we don't like it, but it has, until now, been somehow antithetical to use a command line when using the GUI-driven interface of the Macintosh has been half the appeal in getting work done. We'll get used to the command line in time (in part, this project has been my way of trying to get over my own fears) and eventually embrace it for some stuff, it just might take a little longer for some of us than others.

So this is partly a tutorial from a total novice's point of view in how to use the CL, but also to get the Folding (http://folding.stanford.edu/) and Seti (http://setiathome.ssl.berkeley.edu/unix.html) clients going with a couple of shell scripts -- without deleting the contents of your hard drive. What's the benefit of using the CL clients? Without the CPU overhead that the main GUI applications have, you can process things a little faster, and you get to be a little geeky while you do it.

A previous Folding GUI client (2.1.9) had problems on my computer and i think the project has a great deal of merit, so i decided to work on getting the CL client going, which is how this project came about. I wanted the CL clients to work, but i also wanted them to be set once and never played with again. I just wanted to start the things and walk away and get on with my life.

Lots of people probably think you're wasting your time downloading these scripts, and i'm also waiting for the inevitable "..this is just two stupid shell scripts that anyone could write themselves," that usually turns up in the Versiontracker forums. And you know what? They're right. These are just two stupid shell scripts that anyone could write, but it doesn't mean that you should have to retype a simple command over and over again to do, what is in fact, just trying to get an application started. I should add that it doesn't make you stupid because you do or don't want to do this either. And it's not like Mac users haven't heard of and used Apple Scripts to help their work flow for the last decade, right?

There are a number of GUI's out there that work with the Seti CL clients with differing methods. These are obviously a good idea and can do things that provide information and feedback without the overhead of the screen saver. The two i have used until now are:

1. SETICNTL which can be found here: http://www.westol.com/~schimpj/software.html
2. Seti Control which can be found here: http://homepage.mac.com/delaneyrm/SETIcontrol.html

They're both good, but they do differ in how much work you have to do to get them going using the CL. SETICNTL gives feedback on unit progress and lets you download and queue units. In contrast, Seti Control is basically a start/stop GUI, but doesn't provide feedback in a (for me) conventional or useful way.

It's also worthy of note that there is now a GUI to the Folding CL client now in the form of Folding Control http://macaddict4life.dhs.org/
Although i think these ideas have a great deal of merit, they still take up CPU cycles and we do want these units completed as fast as possible, right?

Since i originally wrote this there have been a number of updates to the Folding CL Client, the most recent version is now at 3.1.2 and for the most part is no different than previous versions with the exception that the .bin suffix is no longer used and there are a few more preferences to go through, some of which i'm still trying to figure out.
It's worthy to note that the Folding home site http://folding.stanford.edu has some information on setting up the CL client here http://folding.stanford.edu/OSX/OSX.html#console
Insofar as making sure things are working ok with the client, this is a good place to start.

One thing i forgot to mention last time is that it's a good idea to keep an alias of the 'work' folder on your desktop. If you look in home/Library/Folding@home/ there should be a folder called work. In this folder will be a log file that keeps track of how you're progressing on your work unit. Why not an alias of the log itself? Well, when each new unit has been completed you receive a new log file that will have a different numerical value to it.

What this is and how it works. (Real info here)

Within the download should be this Read Me and two scripts.
1. Folding.command
2. Seti.command

Both of these shell scripts can be configured to open and start the Folding and Seti clients with basic or slightly more advanced pieces of feedback with a double-click. The .command suffix makes them clickable. At the moment they're configured for my computer and you can read their contents by opening them with TextEdit. You should see three lines of instructions.

1. Designates the script
2. The directory path to the command line application
3. Starts the application (./setiathome) and requests a verbose output in the terminal window

Very, very simple huh. Another way to think of these scripts is as just a kind of alias that tells the terminal to open an application. I mean, it can get a bit tiresome typing the same stuff over and over, right? Although i am not a member of the Macnn efforts, there are some excellent instructions on downloading and installing the Folding client:

http://team.macnn.com/fold/installc.phtml

You should also take a look at the Macnn board for the Seti client:
http://team.macnn.com/seti/index.phtml

This board also includes good instructions on how to install and configure the client:
http://team.macnn.com/seti/installc.phtml

Once you have the clients as you would like them to be configured, it should just be a matter of adapting the second line of the scripts to indicate the directory in which your application resides, and the name you decided to call the application in the third line. So if you called your folding client Gromit, you should have a command that says ./Gromit. To stop the client running a Command-Period is used.

While i was configuring the shell scripts, the terminal gave me a list of various commands when i mistakenly wrote a wrong -verbose command. These included a list of commands that you can tell the client to do when it is launched.
Here are the commands for the Folding client:

-config (Configure user information)
-queueinfo (Get information on queued work units)

-delete x (Delete item #x from work queue)
-send x (Send result #x to server. Use x=all to send all results)
-verbosity x (Sets the output level, from 1 to 9 (max). The default is 3)
-noprompt (Run without prompting user about config errors)
-pause (Pause after finishing & trying to send current unit)

And these for the Seti client:

-version (show version info)
-login (log in)
-countries (show list of country codes)
-nice N (set priority to N)
-email (send email notification on error)
-graphics (create shared mem segment for graphics)
-proxy hostname:port (connect to SH server through specified
proxy server)
-stop_after_process (stop after current WU - do NOT send result)
-stop_after_xfer (stop after current WU - DO send result)
-verbose (print running status)
-nolock (skip multiple-instance check)
-socks_server hostname:port (SOCKS proxy)
-socks_user name (SOCKS user name)
-socks_passwd passwd (SOCKS password)

I hope these commands might inspire you to play around with the shell scripts for customizing what you want them to do for your own purposes. The only limitation i have found in using the command line is the terminal's lack of feedback insofar as progress being made. If anyone out there knows a command that can tell me how much of a unit has been completed, i'd really like to know.

Otherwise, best of luck, and if i can help out with anything, do drop me a line and i'll try and help. Please keep in mind that i'm still a novice. The usual legalese is as follows....These scripts are provided as is and i won't be held responsible if your computer decides to die on you. However, having said that, there's nothing in these scripts that in any way should even come close to doing that. For added fun, copy the application icons onto the scripts and keep them on your desktop. For even more fun, you can put the scripts in your script menu:
http://www.apple.com/applescript/macosx/script_menu/

When putting them in the menu, you no longer need the .command suffix and you can read the output in the Console application, thus bypassing the terminal window. To quit them running in the background, use the Process Viewer utility. How many ways can we skin this cat?

All the best,
Gary
_____________________________________________________________
"The difficulty now is that unexceptional adults believe the loss of youthful dreaming is itself "growing up," as though adulthood were the passive conclusion to a doomed activity and hope during adolescence."

The Uses of Disorder: Personal Identity and City Life
-- Richard Sennett
OO
[_]<|
/|\
Gary Elshaw
Film and Media Studies
Victoria University,
New Zealand
http://elshaw.tripod.com/