10

On MaxOS I created ~/Library/LaunchAgents/x.plist. Then I loaded it with "launchctl load ..."

I made some edits, unloaded and reloaded it. When I type "launchctl list x" it does not display any of my mods to the plist file.

How can I get launchctl to load my new changes? How is it remembering the first version of this file even after I unloaded it? Does it use a cache?

1 Answer 1

11

The quickest way to update is:

# copy the new file to ~/Library/LaunchAgents

launchctl unload ~/Library/LaunchAgents/x.plist
launchctl load   ~/Library/LaunchAgents/x.plist
Sign up to request clarification or add additional context in comments.

1 Comment

Launch agents in the user library should not be launched with sudo. They are run as the user themself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.