2026-10-08 12:19:26 -04:00
|
|
|
# Paste into Apple Remote Desktop: select NA ProPresenter Mac, NA Tracks, NA Translation, NA Ingest ->
|
2026-10-08 12:02:39 -04:00
|
|
|
# Manage -> Send UNIX Command -> "Run command as: User: root" -> Send.
|
|
|
|
|
#
|
|
|
|
|
# Lets the status panel start Dante Virtual Soundcard's audio engine, which needs admin rights:
|
|
|
|
|
# 1. /usr/local/sbin/status-panel-dvs-start - an admin-owned script that does exactly what
|
|
|
|
|
# pressing Start in DVS does (sets wantToRun = 1 and restarts the DVS service), nothing else.
|
|
|
|
|
# 2. /etc/sudoers.d/status-panel - lets the logged-in user run ONLY that script as admin,
|
|
|
|
|
# without a password. It is checked with visudo before it is put in place.
|
|
|
|
|
# Undo on a Mac: rm /usr/local/sbin/status-panel-dvs-start /etc/sudoers.d/status-panel
|
|
|
|
|
U=$(stat -f%Su /dev/console)
|
|
|
|
|
mkdir -p /usr/local/sbin
|
|
|
|
|
cat > /usr/local/sbin/status-panel-dvs-start <<'EOS'
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
# Companion status panel (NA Ingest): start Dante Virtual Soundcard's audio engine,
|
|
|
|
|
# as pressing Start in DVS does. Remove with:
|
|
|
|
|
# rm /usr/local/sbin/status-panel-dvs-start /etc/sudoers.d/status-panel
|
|
|
|
|
/usr/bin/defaults write /Library/Preferences/com.audinate.dante.dvs wantToRun -int 1
|
|
|
|
|
/bin/launchctl kickstart -k system/com.audinate.dante.DanteVirtualSoundcard
|
|
|
|
|
EOS
|
|
|
|
|
chown root:wheel /usr/local/sbin/status-panel-dvs-start
|
|
|
|
|
chmod 755 /usr/local/sbin/status-panel-dvs-start
|
|
|
|
|
echo "$U ALL=(root) NOPASSWD: /usr/local/sbin/status-panel-dvs-start" > /tmp/status-panel.sudoers
|
|
|
|
|
if /usr/sbin/visudo -cf /tmp/status-panel.sudoers >/dev/null 2>&1; then
|
|
|
|
|
install -m 440 -o root -g wheel /tmp/status-panel.sudoers /etc/sudoers.d/status-panel
|
|
|
|
|
echo "OK user=$U mac=$(scutil --get ComputerName) sudoers.d-included=$(grep -c '^#includedir /private/etc/sudoers.d' /etc/sudoers)"
|
|
|
|
|
else
|
|
|
|
|
echo "FAILED: sudoers rule did not validate, nothing installed for it"
|
|
|
|
|
fi
|
|
|
|
|
rm -f /tmp/status-panel.sudoers
|