Automatically launching NoMAD

You may want to have NoMAD automatically launch whenever a user logs in to their Mac. There are a few ways to do this.

System LaunchAgent

The most robust method for launching NoMAD on login is to create a System LaunchAgent, which will launch NoMAD whenever any user logs into the macOS GUI and can be set to ensure that the application will re-launch if it ever crashes or is quit by the user.

A LaunchAgent consists of a plist file in /Library/LaunchAgents owned by root that references the path the application and a few other keys:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.trusourcelabs.NoMAD</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/Applications/NoMAD.app/Contents/MacOS/NoMAD</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

You can find an installer for a NoMAD System LaunchAgent here.

User LaunchAgent

A User LaunchAgent is similar to a System LaunchAgent, but the plist is placed in the user’s home folder, ~/Library/LaunchAgents, instead of in /Library/LaunchAgents. The file needs to be owned by the user; it will then launch NoMAD whenever that user logs in. Note that the user will be able to remove or otherwise modify this agent.

Login Item

A more casual method for automatic launching is to use a Login Item. This is done through the Users & Groups pane of the System Preferences. You can specify a Login Item for your user account here. Unlike the LaunchAgents, there is no method for re-launching the application in the case of a crash. However, this method can be done entirely in the GUI by non-admin users.