¿La lista de propiedades es propiedad de root? Si no lo está, no se carga al iniciar sesión, incluso si launchctl load
(sin sudo) lo cargaría.
$ 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
$
Si se pretende que el programa se ejecute cuando se carga la lista de propiedades, establezca RunAtLoad en true:
<key>RunAtLoad</key>
<true/>
También puede usar normalmente / Library / LaunchAgents / en lugar de / System / Library / LaunchAgents /. Desde 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.