launchd – Easy methods to run Plex Media Server at Startup With No Customers Logged In

    0
    70


    I am making an attempt to get Plex Media Server (PMS) to launch at boot time even when no customers are logged in. I am utilizing Lingon to generate the plist file which finally ends up right here: /Library/launchdaemons

    Hassle is, it does not work.

    I’ve tried all of this on each a 2017 iMac operating the Ventura Public Beta and on a M1 iMac operating Monterey, 12.6. It fails equally nicely on each machines.

    If I exploit Lingon’s “Take a look at” facility I get the next error message:

    1: Operation not permitted
    
    PMS: failure detected. Learn/write entry is required for path: Plex Media Server
    

    I am unsure what path “Plex Media Server” refers to.

    If I reboot the machine, PMS doesn’t launch. If I attempt to load the plist I get:

    MrMuscle:LaunchDaemons mnewman$ sudo launchctl load -w com.mgnewman.plex.plist
    /Library/LaunchDaemons/com.mgnewman.plex.plist: service already loaded
    Load failed: 37: Operation already in progress
    

    However PMS is just not operating

    Observe that it does work if I put the plist right here:

    ~/Library/launchagents, however provided that I am logged in and that is not what I need.

    What do I must do to make this work?

    This is the whole launchd plist file:

    MrMuscle:LaunchDaemons mnewman$ sudo cat com.mgnewman.plex.plist
    <?xml model="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist model="1.0">
    <dict>
        <key>Disabled</key>
        <false/>
        <key>EnvironmentVariables</key>
        <dict>
            <key>PATH</key>
            <string>/usr/native/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/decide/X11/bin:/Library/Apple/usr/bin:/Purposes/Wireshark.app/Contents/MacOS:/usr/native/sbin:/decide/native/bin</string>
        </dict>
        <key>KeepAlive</key>
        <dict>
            <key>Crashed</key>
            <true/>
            <key>SuccessfulExit</key>
            <true/>
        </dict>
        <key>Label</key>
        <string>com.mgnewman.plex</string>
        <key>ProgramArguments</key>
        <array>
            <string>Purposes/Plex Media Server.app/Contents/MacOS/Plex Media Server</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
    </dict>
    </plist>
    

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here