From ef9d75598201b5ff1daac7f866ede3b6c675b6ee Mon Sep 17 00:00:00 2001 From: christian Date: Thu, 8 Oct 2026 12:02:39 -0400 Subject: [PATCH] Let a DANTE hold start Dante Virtual Soundcard's engine, not just open the app. remote-access/mac-dvs-helper.sh (run once per Mac through Remote Desktop as root) installs an admin-owned script that does what pressing Start in DVS does (wantToRun = 1, restart the DVS service) and a sudoers rule letting the logged-in user run only that script. The dvs_ fixes call it with sudo -n, so until it is installed the hold shows FIX FAILED rather than pretending. Co-Authored-By: Claude Opus 5.5 --- config.json | 6 +++--- remote-access/mac-dvs-helper.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 remote-access/mac-dvs-helper.sh diff --git a/config.json b/config.json index 395a77a..17aefb2 100644 --- a/config.json +++ b/config.json @@ -39,9 +39,9 @@ "run": "pgrep -xq Live || open -a 'Ableton Live 11 Suite'" }, "translate": { "host": "translation", "short": "TRANSLATE", "label": "start Church Translate if it is not running", "run": "pgrep -xq 'Church Translate' || open -a 'Church Translate'" }, - "dvs_prop": { "host": "prop", "short": "DVS", "label": "open Dante Virtual Soundcard on the ProPresenter Mac", "run": "open -a 'Dante Virtual Soundcard'" }, - "dvs_tracks": { "host": "tracks", "short": "DVS", "label": "open Dante Virtual Soundcard on the Tracks Mac", "run": "open -a 'Dante Virtual Soundcard'" }, - "dvs_translation": { "host": "translation", "short": "DVS", "label": "open Dante Virtual Soundcard on NA Translation", "run": "open -a 'Dante Virtual Soundcard'" }, + "dvs_prop": { "host": "prop", "short": "DVS", "label": "start Dante Virtual Soundcard on the ProPresenter Mac", "run": "sudo -n /usr/local/sbin/status-panel-dvs-start && open -a 'Dante Virtual Soundcard'" }, + "dvs_tracks": { "host": "tracks", "short": "DVS", "label": "start Dante Virtual Soundcard on the Tracks Mac", "run": "sudo -n /usr/local/sbin/status-panel-dvs-start && open -a 'Dante Virtual Soundcard'" }, + "dvs_translation": { "host": "translation", "short": "DVS", "label": "start Dante Virtual Soundcard on NA Translation", "run": "sudo -n /usr/local/sbin/status-panel-dvs-start && open -a 'Dante Virtual Soundcard'" }, "bridge": { "kind": "local", "short": "BRIDGE", "label": "restart the Resi bridge", "run": "launchctl kickstart -k gui/$(id -u)/org.waterschurch.resi-propresenter || launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/org.waterschurch.resi-propresenter.plist" }, "captions": { "kind": "local", "short": "CAPTIONS", "label": "restart lobby captions", diff --git a/remote-access/mac-dvs-helper.sh b/remote-access/mac-dvs-helper.sh new file mode 100644 index 0000000..465a9f3 --- /dev/null +++ b/remote-access/mac-dvs-helper.sh @@ -0,0 +1,29 @@ +# Paste into Apple Remote Desktop: select NA ProPresenter Mac, NA Tracks, NA Translation -> +# 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