launchd – Launchctl load -w generate Service cannot load in requested session

I ran the following command:

launchctl load -w /Library/LaunchAgents/...plist

The plist file has the following values:

<key>KeepAlive</key>
        <true/>
        <key>StandardErrorPath</key>
        <string>/dev/null</string>
        <key>StandardOutPath</key>
        <string>/dev/null</string>
        <key>LimitLoadToSessionType</key>
        <string>Aqua</string>
        <key>ProcessType</key>
        <string>Interactive</string>

When I run:

sudo launchctl bootstrap gui/501 /Library/LaunchAgents/...plist` 

I got

/Applications/...app/Contents/scripts/...plist: Service is disabled

And then I ran:

launchctl load -w /Library/LaunchAgents/...plist 

with the error:

Service cannot load in requested session

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: