Project

General

Profile

Autostart Core on Mac » History » Version 2

« Previous - Version 2/10 (diff) - Next » - Current version
m4yer, 06/06/2010 12:06 AM


Autostart Core on Mac

The best way to autostart a script on Mac, is to use the default autostart deamon: launchd

First you need to make a property list file (plist), which launchd can load.

Here's an example plist (by e-jat)

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.quasselcore.daemon</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Quassel/quasselcore</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/Applications/Quassel</string>
</dict>
</plist>

Save this file in ~/Library/LaunchAgents/org.quassel-irg.quasselcore.plist, then go into Terminal and, in your home directory, run:

launchctl load Library/LaunchAgents/com.apple.TextEdit.plist

quasselcore should now run and start automatically at boot.