Project

General

Profile

Autostart Core on Mac » History » Version 2

Version 1 (m4yer, 06/06/2010 12:03 AM) → Version 2/10 (m4yer, 06/06/2010 12:06 AM)

h1. 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)
@<?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>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 automaticly at boot.