Lingon and Folding At home
Ashley Aitken
mrhatken at mac.com
Wed Nov 22 17:41:18 PST 2006
Hi LuKreme,
On 23/11/2006, at 8:11 AM, LuKreme wrote:
> <key>ProgramArguments</key>
> <array>
> <string>cd /Users/kreme/Library/Folding\@Home</string>
> <string>/usr/local/bin/fah5-local -forceasm -advmethods -verbose
> 9</string>
> </array>
>
> The trouble is, I can't seem to START the User Agent, and after
> fiddling with the command line and launchtl I think the issue is
> the cd command:
Yes, I think it is the problem. I think you may be misinterpreting
ProgramArguments. My understanding (and experience from using this
is in the past) is that they are the name of one program and its
arguments individually separated. You can't run a sequence of
commands from a launchd item, but of course you can start a script
that has a sequence of commands in it.
So if you want to run
aProgram -c filename 123
You would use something like:
<key>ProgramArguments</key>
<array>
<string>/full/path/to/aProgram</string>
<string>-c</string>
<string>filename</string>
<string>123</string>
</array>
ProgramArgument is like the array of strings from the command-line
that are passed into a running application (e.g. argv).
So probably good to put your two commands into a script, or even just
run the fah5-local command with arguments (unless you really need to
change to the directory, is there a directory argument?).
Hope that helps.
Cheers,
Ashley.
More information about the MacOSX-talk
mailing list