Plist en /System/Library/LaunchAgents no se carga al reiniciar [cerrado]

Creé el plist y lo coloqué en /System/Library/LaunchAgents/. Sin embargo, cuando reinicio mi Mac, no se carga como se esperaba. Puedo cargarlo desde la Terminal con comandos launchctl loady unloady está perfectamente cargado desde allí. Y también revisé la consola después de reiniciar y no tiene ninguna entrada relacionada con el plist.

¿Cómo puedo hacer que este plist se ejecute en el arranque?

vamos a ver la lista
Vea las respuestas a esta otra pregunta: superuser.com/a/832673 lo que funcionó para mí fue usar chmod 600(o chmod 644) y chown root.

Respuestas (1)

¿La lista de propiedades es propiedad de root? Si no es así, 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 el programa debe ejecutarse cuando se carga la lista de propiedades, establezca RunAtLoad en verdadero:

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

También puede usar normalmente /Library/LaunchAgents/ en lugar de /System/Library/LaunchAgents/. de 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.