plist not launching at boot w/ launchd

Discussion in 'macOS' started by MyEyez, Oct 20, 2011.

  1. MyEyez macrumors newbie

    Joined:
    Oct 20, 2011
    #1
    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!
     
  2. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #2
    You can't load GUI programs without being logged in. Its a security limitation of Mac OS X.
     
  3. MyEyez thread starter macrumors newbie

    Joined:
    Oct 20, 2011
    #3

Share This Page