5

I've placed the following com.apple.test.plist file in the folder:

/System/Library/LaunchDaemons

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.apple.Spotlight</string> <key>ProgramArguments</key> <array> <string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> 

But for some reason ApplicationTest.app does not start when i login with my user todd.

Any ideas?

1 Answer 1

8

The key ProgramArguments expects an executable file but you provided an application bundle, which is a glorified directory. In order to start the application you have to point launchd to the executable inside the bundle:

<key>ProgramArguments</key> <array> <string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app/Contents/MacOS/ApplicationTest</string> </array> 

Alternatively use the open(1) command to run the application:

<key>ProgramArguments</key> <array> <string>/usr/bin/open</string> <string>-W</string> <string>/Users/todd/Dropbox/client/CLIENT.BUILDS/MAC/v0.1/ApplicationTest.app</string> </array> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.