0

i'm trying to make a simple Launch Agent that run a test app at system load. I followed the official documentation, but can not get it to work. my plist file is located at /Library/LaunchAgents/Test.launcher.mac.service.plist. a ls -l returns:

-rwx------@ 1 root  wheel  578 Jan 21 08:46 /Library/LaunchAgents/Test.launcher.mac.service.plist.

the content of my plist is:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/P$
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>Test.launcher.mac.service</string>
        <key>KeepAlive</key>
        <true/>
        <key>StandardOutPath</key>
        <string>/var/opt/AuraService.log</string>
        <key>StandardErrorPath</key>
        <string>/var/opt/AuraServiceError.log</string>
        <key>Program</key>
        <string>/Applications/TextEdit.app/Contents/MacOS/TextEdit</string>
        <key>Debug</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
</dict>

what i'm doing wrong?

  • Any error message when loading the job via launchctl load /Library/LaunchAgents/Test.launcher.mac.service.plist? – LCC Jan 21 '14 at 17:20
  • i don't get any error if run launchctl load with "-W" or without "-W". – moscoquera Jan 21 '14 at 20:27
  • I installed this job definition via copy&paste and loaded it. The only warning I got was that on my system the directory /var/opt does not exist. TextEdit started nevertheless. Are you sure TextEdit did not start? Maybe it just did not open a window. – LCC Jan 27 '14 at 8:56

You must log in to answer this question.

Browse other questions tagged .