Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have created the plist and placed it in /System/Library/LaunchAgents/. However, when I reboot my Mac it does not load like it is expected to. I am able to load it from the Terminal with launchctl load and unload commands and it is perfectly loaded from there. And also I have checked the console after reboot and it does not have any entry related to the plist.

How can I get this plist to run on boot?

share|improve this question

closed as unclear what you're asking by Mark, patrix Nov 22 '13 at 4:31

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Let's see the plist –  Mark Oct 16 '13 at 10:55

1 Answer 1

Is the property list owned by root? If it is not, it is not loaded on login even if launchctl load (without sudo) would load it.

$ sudo launchctl load /Library/LaunchAgents/test.plist 
launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/test.plist
nothing found to load
$ sudo chown root /Library/LaunchAgents/test.plist 
$ sudo launchctl load /Library/LaunchAgents/test.plist 
$ 

If the program is meant to be run when the property list is loaded, set RunAtLoad to true:

<key>RunAtLoad</key>
<true/>

Also you can normally use /Library/LaunchAgents/ instead of /System/Library/LaunchAgents/. From man launchd:

~/Library/LaunchAgents         Per-user agents provided by the user.
/Library/LaunchAgents          Per-user agents provided by the administrator.
/Library/LaunchDaemons         System-wide daemons provided by the administrator.
/System/Library/LaunchAgents   Per-user agents provided by Mac OS X.
/System/Library/LaunchDaemons  System-wide daemons provided by Mac OS X.
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.