I'm trying to use a launchagent on login to kill the Finder, and then re-launch TotalFinder, to automatically apply the colorsidebar mod for OS X 10.7 (the mod can be found here).
If I use the launchagent to call a shell script, it's fine, like so:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.colorsidebar.root</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/POSIX/path/to/some/shell/script.sh</string>
</array>
</dict>
</plist>
And then in the shell script, all I use is
#!/bin/bash
#
#This file kills the finder on user session start
#and re-launches TotalFinder
#
killall Finder
Open /Applications/TotalFinder.app
Now, when I try to combine the two like so
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.colorsidebar.root</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>killall Finder</string>
<string>open /Applications/TotalFinder.app</string>
</array>
</dict>
</plist>
It doesn't work, and console shows the following error:
8/21/11 5:16:16.957 PM com.colorsidebar.root: /bin/bash: killall Finder: No such file or directory