.plist
extension (for example, com.myname.myapplication.plist
) with the following content:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.myname.myapplication</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/My Application.app/Contents/MacOS/my_application</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>
2. Replace strings in bold with your application id (can be any unique string) and path to your application executable.
3. Put it to
/Library/LaunchAgents
directory:sudo cp com.myname.myapplication.plist /Library/LaunchAgents
4. Change file permissions to 644:
sudo chmod 644 com.myname.myapplication.plist
More information:
No comments:
Post a Comment