Enable Accessibility Apps via ARD

Blog Enable Accessibility Apps via ARD


I am always looking for ways to use Automator to make my life easier. Its a great tool that offers some impressive capabilities, my favorite of course is the ability to record UI events and convert that into a workflow or even a stand-alone app that you can then deploy and run via ARD.

Sounds simple right? Well one little hitch, Apple wont let you run the automated UI apps made in automator without first adding them to the accessibility section of OSX. Creating an app that can run a few clicks automatically and then trying to open and run that app on a large number of computers remotely poses some challenges, namely how do you add the app to the accessibility pane remotely?

There is a way to do it but first you have to find the Bundle ID of the app that you want to add to the accessibility pane. To get the bundle ID of the app in question you would run this command. Note that you need to replace App Name with the actual app that your trying to get the bundle identifier for.

Get Bundle ID


bash-3.2$ /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/<Appname.app>/Contents/Info.plist
com.apple.Safari

Then we use the Bundle ID in the following command to modify the permission database. Note change the with the actual bundle ID from the previous step.

Update the Database


bash-3.2$ sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','<Bundle-ID>',0,1,1,NULL);" 

To remove an application from the list we use the following command, with the correct bundle ID

bash-3.2$ sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "delete from access where client='<Bundle ID>';"

Conclusion


Now that you have remotely added the app that you want to run via ARD you can simply open the app using the open unix command to do so via ARD like so.

bash-3.2$ sudo open -a appname.app 

and thats all there is to it, the automator app will run remotely. I hope that you have found this little article helpful!

Grove Technologies

ABOUT Grove Technologies
We are a team of Apple Certified experts that all have backgrounds in either online digital marketing and media, education or managing non profits. We know how to keep your systems safe, online and secure.

Grove is the place where your Apple technology thrives. Check out our managed services. Our App Store solution will keep your computers updated with our tested Apple and Third Party updates. Do not wonder if your up to date or protected.

Know you are.

Copyright © Grove Technologies LLC. All Rights Reserved.