PDA

View Full Version : Darwin SetiAtHome


zimwy
03-14-2002, 01:56 AM
Hi,
I am running the darwin version of setiathome but I was wondering about the following. I would like to just type in setiathome into a terminal shell (or when logged in as >console) in order to run setiathome. I've tried dragging the SetiAtHome file into the /usr/bin folder while logged in as root and this worked, BUT setiathome makes about 12 files "in the directory in which it's run." Now, since it can't write to /usr/bin it put them in my home directory which I really don't want because it clutters everything up. I was wondering if there was a way to write a little something that would say, "Run setiathome from this other directory." Any help would be appreciated. Oh, I tried making a textfile that contained:
cd /Applications/setiathome-darwin/
./setiathome
but it would tell me that I don't have permission to /usr/bin

Any ideas?
Thanks,
Gabe Taubman

xchanyazy
03-14-2002, 06:45 AM
I use this alias (it resides in ~/.cshrc) to start up my distributed.net client - alias dnetc '/Applications/Math/dnetc-macosx-ppc/dnetc '. Then I can just type dnetc instead of the full path. That may work for you, possibly along the lines of alias setiathome '/Applications/setiathome-darwin/setiathome '.
HTH

glozing
03-14-2002, 08:00 AM
In your Home folder, create a folder called bin and place the setiathome file inside it. Now you can type setiathome from the terminal and it will run.

zimwy
03-14-2002, 01:25 PM
Hi,
That works. I am allowed to type "setiathome" from the console but it still places all of its files in my home directory. Any suggestions?

Gabe

P.S. I tried setiathome in a folder called setiathome which was in the bin folder in my home folder but that didn't work at all.

xchanyazy
03-14-2002, 03:58 PM
Have you tried changing your path to include the setiathome folder? In ~/.cshrc, put in this line:
set path=( $path /Applications/setiathome-darwin/ )

If there already is a line that says set path= at the beginning, just put a space after the last entry and type in /Applications/setiathome-darwin/. I'm not sure if that will put the files in your home folder or not, I know that the alias command won't.

zimwy
03-14-2002, 04:46 PM
I tried both the alias and the path in the .cshrc file and both of them put files in my home directory, but I've realized why. Whatever directory I'm in when I type setiathome (which now works due to the path command (and worked with the alias command too) will get all the setiathome files. I think it is written like this so you can have multiple instances of it running, just not in the same folder. So I guess my question now is how can I tell it to switch my directory to a specified one, run setiathome and then switch back? Oh, and how do I tell it to stop without doing a Command-C ? Is there are any other way? Thanks,

Gabe

russh
03-18-2002, 06:19 AM
Originally posted by zimwy
I tried both the alias and the path in the .cshrc file and both of them put files in my home directory, but I've realized why. Whatever directory I'm in when I type setiathome (which now works due to the path command (and worked with the alias command too) will get all the setiathome files. I think it is written like this so you can have multiple instances of it running, just not in the same folder. So I guess my question now is how can I tell it to switch my directory to a specified one, run setiathome and then switch back? Oh, and how do I tell it to stop without doing a Command-C ? Is there are any other way? Thanks,



I'm curious about this too.

How does one keep from littering my Home directory with files when running a CLI program like SETI?

stetner
03-18-2002, 06:44 AM
You can create a script like:#! /bin/sh
cd /Users/ME/path/where/i/want/files
/path/to/setiathome -nice 20 &Cheers,

stetner
03-18-2002, 06:53 AM
I guess that was a little short, given this is the newcomers forum... sorry 8-)

I will not go into how to edit a file (search the forum for 'pico' and you should find instructions), but remember to 'chmod o+x <myscript>' once you are done. When you run it it cd's to the directory, fires up seti with that dir as its current directory (all the files will go in there) and then exits, returning you to your original shell which is still in whatever directory you started in.

As forHow does one keep from littering my Home directory with filesyou need to understand the program you are running (read the README files!) before you run it.

russh
03-18-2002, 07:12 AM
Originally posted by stetner


I will not go into how to edit a file (search the forum for 'pico' and you should find instructions), but remember to 'chmod o+x <myscript>' once you are done. When you run it it cd's to the directory, fires up seti with that dir as its current directory (all the files will go in there) and then exits, returning you to your original shell which is still in whatever directory you started in.



Thanks for replying. If I am understanding correctly, this is basically a clean-up script for after the fact? In other words, I have to run it to clean up?

Or does it start seti and make it so seti will put files in its own directory?

Sorry to be so dense. I'm understanding the basics of the terminal pretty well (pico, etc.) but I still haven't quite grasped this scripts concept.

zimwy
03-18-2002, 01:04 PM
Originally posted by stetner
...but remember to 'chmod o+x <myscript>' once you are done.

I don't really understand what this is... I've seen chmod but I don't understand what it does, nor how to get the right number after it. What do you mean by o+x? Thanks,

Gabe Taubman

xchanyazy
03-18-2002, 02:04 PM
Remember, you can always check the man pages for unfamiliar commands.

As for chmod o+x, that basically means make the script executable. chmod changes the access mode using 3 arguments - who, operation, and permission. Who is user (u), group (g), other (o) or all (a, default), operation is add permission (+), remove permission (-), or assign permission (=, this removes permission if they are left unspecified), permissions are (there are more, but these are the basic) read (r, 4), write (w, 2), and execute (x, 1).

stetner
03-19-2002, 07:26 AM
Originally posted by russh
Thanks for replying. If I am understanding correctly, this is basically a clean-up script for after the fact? In other words, I have to run it to clean up?

Or does it start seti and make it so seti will put files in its own directory?It is what I would use to start seti. Basically I have a directory in my home directory where all the seti stuff is: /Users/stetner/setiathome
So my script to start seti up looks like this:#! /bin/sh
cd /Users/stetner/setiathome
./setiathome -nice 20 &Which means that wherever I am in the filesystem (eg. /tmp), when I run the above script, it cds to my setiathome directory and runs the setiathome executable that is there in the background (the & indicates I want it run in the background). Since setiathome was started in the directory /Users/stetner/setiathome, that is where it puts all its files. The script then exits and I am left where I started from (eg /tmp).

Hope this makes it clearer.