Help with creating LaunchAgent plist

New Contributor III

Hi Everyone

I'm very new to the coding side of MacOs and currently need to create a LaunchAgent for our printer costing app. The app itself is just a normal app that can be manually launched from launchpad or set to auto launch per user, however I need to make sure it runs on every single log in inside our labs. Can someone give me some pointers or help in creating the plist file? I literally just need it to launch "/Applications/Monitor" when someone logs in.




It looks like is the new URL

Valued Contributor

You will want something like this. Save it as a plist, with the same name as the unique name you set in it.

The Unique name will need to follow the normal conventions, I found starting it with works. Have a look at the names used in the LaunchAgents folder.

The Path to the app, might require you to go into the Contents of the app and find the actual launcher in there.

The KeepAlive will ensure that it can't be quit, ever.

When you put the file in place in the LaunchAgents folder it will need to be set to 644 for its permissions. They are fussy about the permissions.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">


New Contributor II

I'd do something like this... 



# open /Applications/Monitor at login


/usr/libexec/PlistBuddy -c "Add :Label string" $LAUNCHDAEMON
/usr/libexec/PlistBuddy -c "Add :RunAtLoad bool 1" $LAUNCHDAEMON
/usr/libexec/PlistBuddy -c "Add :ProgramArguments array" $LAUNCHAGENT
/usr/libexec/PlistBuddy -c "Add :ProgramArguments: string /Applications/Monitor\" $LAUNCHAGENT​