From 3ff9488146f1becf49e0470212ed02c71ffd7695 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Mon, 27 Dec 2021 18:17:25 +0300 Subject: [PATCH] [macOS] Enable voiceover if SIP is disabled (#4805) * Enable voiceover if SIP is disabled * Replace touch with `echo -n "a"` The file should contain `a` symbol Co-authored-by: Craig Morten * Wrap sudo call into bash -c Co-authored-by: Craig Morten --- images/macos/provision/configuration/configure-machine.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/images/macos/provision/configuration/configure-machine.sh b/images/macos/provision/configuration/configure-machine.sh index 73c77c1d..c97d4439 100644 --- a/images/macos/provision/configuration/configure-machine.sh +++ b/images/macos/provision/configuration/configure-machine.sh @@ -17,6 +17,11 @@ if [ -d "/Library/Application Support/VMware Tools" ]; then sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885 fi +# Update VoiceOver Utility to allow VoiceOver to be controlled with AppleScript by creating a special file (SIP must be disabled) +if csrutil status | grep -Eq "System Integrity Protection status: (disabled|unknown)"; then + sudo bash -c 'echo -n "a" > /private/var/db/Accessibility/.VoiceOverAppleScriptEnabled' +fi + # https://developer.apple.com/support/expiration/ # Enterprise iOS Distribution Certificates generated between February 7 and September 1st, 2020 will expire on February 7, 2023. # Rotate the certificate before expiration to ensure your apps are installed and signed with an active certificate.