1

I am trying to develop a Mac LaunchAgent and am testing with this, which should start the console:

<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.depthmine.test</string>
<key>ProgramArguments</key>
<array>
    <string>/Applications/Utilities/Console.app/Contents/MacOS/Console</string>
</array>
</dict>
</plist>

The file appears to load (no errors in the Terminal) but the console does not start and there does not seem to be a process in Terminal either. I also tried a PHP script and that didn't start either.

Jeremy
  • 883
  • 1
  • 20
  • 41
  • where did you put the LaunchAgent plist file and what permissions are set on it? and when you log out and back in, do you still have the same problem? – Michael Dautermann Jul 01 '12 at 18:39
  • If I run "launchctl load ~/Library/LaunchAgents/" it says my file: test.plist is "Already Loaded." Trouble is, the console hasn't loaded and there is no other obvious sign that this is working...? – Jeremy Jul 01 '12 at 19:50
  • If I run "launchctl list," the Status is "1." Any idea what this means? – Jeremy Jul 01 '12 at 21:05
  • 1
    "1" is the exit status of the last time that job was run. According to "`man launchctl`", "The first column displays the PID of the job if it is running. The second column displays the last exit status of the job. If the number in this column is negative, it represents the negative of the signal which killed the job. Thus, "-15" would indicate that the job was terminated with SIGTERM. The third column is the job's label." – Michael Dautermann Jul 01 '12 at 21:32

0 Answers0