No developer-tools pop-ups on the computers; apps found where they really are; SuperRack and X32-Edit
On a Mac without the Command Line Tools, /usr/bin/python3 is a stub that opens Apple's installer on that Mac's screen: Woonsocket's Tracks and FOH Macs showed it after joining (and would every ten minutes). Python now runs on another Mac only when xcode-select says it is there (MIDI reads, MIDI reconnects, the Computers probe); without it those Macs' own MIDI sessions are simply not read. The app list used a glob that zsh (the Macs' login shell) turns into an error when one pattern matches nothing, so no app was ever found there: find instead, and a running program's app path is taken from the program itself. New recipes: SuperRack SoundGrid and X32-Edit (AUDIO). Woonsocket now has ABLETON, SUPERRACK and X32 EDIT keys, all OK, and NA's page 99 shows them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+13
-3
@@ -2445,7 +2445,7 @@ def stream_remote_midi(snap, cfg, host, stop):
|
||||
proc = None
|
||||
try:
|
||||
proc = subprocess.Popen(ssh_cmd(cfg, host)[:1] + ["-o", "ServerAliveInterval=2", "-o", "ServerAliveCountMax=3"]
|
||||
+ ssh_cmd(cfg, host)[1:] + ["/usr/bin/python3", "-u", "-"],
|
||||
+ ssh_cmd(cfg, host)[1:] + remote_python("-u", "-"),
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
||||
proc.stdin.write(script)
|
||||
proc.stdin.close()
|
||||
@@ -2488,13 +2488,23 @@ def poll_remote_midi(snap, cfg):
|
||||
script = remote_midi_script()
|
||||
for host in remote_midi_hosts(cfg):
|
||||
try:
|
||||
r = subprocess.run(ssh_cmd(cfg, host) + ["/usr/bin/python3", "-"], input=script,
|
||||
r = subprocess.run(ssh_cmd(cfg, host) + remote_python("-"), input=script,
|
||||
capture_output=True, text=True, timeout=20)
|
||||
snap.remote_midi[host] = parse_remote_midi(r.stdout) if r.returncode == 0 else None
|
||||
remember_peers(snap, host, snap.remote_midi[host])
|
||||
except (OSError, subprocess.SubprocessError):
|
||||
snap.remote_midi[host] = None
|
||||
|
||||
# Python on another Mac, only where it is really there: on a Mac without the Command Line Tools,
|
||||
# /usr/bin/python3 is a stub that pops up Apple's "install the developer tools" window on that Mac's
|
||||
# screen (2026-10-20: Woonsocket's Tracks and FOH Macs, every ten minutes). Exit 97 = no python there.
|
||||
REMOTE_PY = "xcode-select -p >/dev/null 2>&1 || exit 97; exec /usr/bin/python3"
|
||||
|
||||
|
||||
def remote_python(*args):
|
||||
return [" ".join([REMOTE_PY] + list(args))]
|
||||
|
||||
|
||||
def ssh_cmd(cfg, host):
|
||||
"""ssh to a machine in config "hosts", with NA Ingest's status-panel key; one shared connection per host."""
|
||||
return ["/usr/bin/ssh", "-i", os.path.expanduser(cfg.get("ssh_key", "~/.ssh/id_status_panel")),
|
||||
@@ -2767,7 +2777,7 @@ def execute_fix(cfg, fix_id, chk):
|
||||
args = (chk["session"], chk["peer"], chk["address"])
|
||||
repoint = bool(chk.get("repoint"))
|
||||
if chk.get("host"):
|
||||
r = subprocess.run(ssh_cmd(cfg, chk["host"]) + ["/usr/bin/python3", "-"],
|
||||
r = subprocess.run(ssh_cmd(cfg, chk["host"]) + remote_python("-"),
|
||||
input=remote_midi_script("ns['connect_peer'](%r, %r, %r, repoint=%r)" % (args + (repoint,))),
|
||||
capture_output=True, text=True, timeout=30)
|
||||
result = parse_remote_midi(r.stdout) if r.returncode == 0 else None
|
||||
|
||||
Reference in New Issue
Block a user