I think I just never tested what would happen when the `osascript` was run with `ssh`. Would you be willing to wrap this whole block in a `if is_ssh; then ...; fi`?