Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MyEyez

macrumors newbie
Original poster
Oct 20, 2011
2
0
Hello All, Im new to OSX and am trying to get a few programs to automatically start at boot. Yes, I know how to get them to start at login but I want them to start at BOOT! Im attempting this with plist files and launchd.

I have my plsit files in /Library/LaunchDaemons

The name of plist in this example is com.apple.plex.plist

The contents look like this:

Code:
<?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.apple.plex</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Applications/Plex.app/Contents/MacOS/Plex</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>Carl</string>
<key>WorkingDirectory</key>
<string>/Users/Carl/</string>
<key>ServiceDescription</key>
<string>Plex</string>
</dict>
</plist>

Now it works great if I open terminal and issue the following command:

Code:
launchctl load /Library/LaunchDaemons/com.apple.plex.plist

But, if I log out it quits working and if I reboot it doesn't auto start. What am I doing wrong here?

After I manually kick it off I can issue the "launchctl list" command and see it in the list.

Thanks!
 
You can't load GUI programs without being logged in. Its a security limitation of Mac OS X.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.