Citing http://launchd.info:
- ~/Library/LaunchAgents and /Library/LaunchAgents are used for the currently logged in user.
- /Library/LaunchDaemons is for running things as root ( or the user specified with the
UserName
key) when the machine boots.
The key (no pun intended), however, is that plists placed in /Library/LaunchDaemons/
must be owned by root:wheel
and should be chmod 644
.
So, just because nrpe
creates a plist does not mean that it will run on boot without login.
I installed it via brew
myself, and at the end it says:
To have launchd start nrpe at login:
ln -sfv /usr/local/opt/nrpe/*.plist ~/Library/LaunchAgents
Then to load nrpe now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nrpe.plist
I would recommend that you do this, instead:
chmod 644 /usr/local/opt/nrpe/homebrew.mxcl.nrpe.plist
sudo chown root:wheel /usr/local/opt/nrpe/homebrew.mxcl.nrpe.plist
sudo ln /usr/local/opt/nrpe/homebrew.mxcl.nrpe.plist /Library/LaunchDaemons/homebrew.mxcl.nrpe.plist
The first line makes sure that the permissions are correct.
The second line makes sure that the ownership is correct
The third/last line links the file from /usr/local/opt/nrpe/ to /Library/LaunchDaemons (note the absence of a ~
which is intentional).
Then you need to make sure that the file does not exist in ~/LaunchAgents, which would be confusing:
rm -f "$HOME/Library/LaunchAgents/homebrew.mxcl.nrpe.plist"
That will delete the file (if it exists).
Important
By placing the file in /Library/LaunchDaemons
you will be telling nrpe
to run as root
. That may be OK, or it may be a very bad idea. I don't know the answer to that question. However, to be safe I would make it explicitly run as a user other than root unless I was absolutely sure. Also, I would use launchd
's ability to log errors to see if it is running OK.
To do this you will need to edit the plist mentioned above. Here is the file as it is originally created, as of 2016/04/20:
<?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>org.nrpe.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/nrpe</string>
<string>-c</string>
<string>/usr/local/etc/nrpe.cfg</string>
<string>-d</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>Homebrew NRPE Agent</string>
<key>Debug</key>
<true/>
</dict>
</plist>
and here is the version that I would recommend:
<?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>Debug</key>
<true/>
<key>GroupName</key>
<string>staff</string>
<key>InitGroups</key>
<true/>
<key>Label</key>
<string>org.nrpe.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/nrpe</string>
<string>-c</string>
<string>/usr/local/etc/nrpe.cfg</string>
<string>-d</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>Homebrew NRPE Agent</string>
<key>StandardErrorPath</key>
<string>/tmp/org.nrpe.agent.stderr.log</string>
<key>StandardOutPath</key>
<string>/tmp/org.nrpe.agent.stdout.log</string>
<key>UserName</key>
<string>INSERTUSERNAMEHERE</string>
</dict>
</plist>
Replace INSERTUSERNAMEHERE
with the actual username of the user that you want nrpe
to run as.
Deprecated
Note that according to LaunchControl (which is the best app out there for managing launchd plists) the Debug
key is deprecated for OS X 10.10 and will be ignored.
Reboot
Once you have the file in place, the best way to test it will be to reboot the system and do NOT log in on console. Instead, after the boot process is complete, log in via ssh
and make sure that the process is running, and check the two log files to see what, if anything, you see there.
I hope this helps.
ps - spend $10 on LaunchControl. It's a great app. There is no registration code so you don't have to pay for it, but you should because the developer trusts you to if you use the app.
Best Answer
Well well. I plugged in my
iPhone
and theWacome One
woke up!What does the first action have to do with the second? Apparently the "tremendous weight" of the usb-c cable for the iPhone - which was a bit entangled with the mini-USB cable to the Wacom - was just enough to put the Wacom connector out of sorts. Jiggling the cable to the iPhone apparently undid that "flakey cable" issue.
So the only potential value now to this question is to confirm YES the Wacom One is working (surprisingly I might add) with macOS Catalina.
Update Apparently there is a specific power cord for Wacom that has a few parts including hdmi, power cable, mini-usb. I must have tossed it / lost it some time ago. So this device is a small-ish brick now.