13.02.2019

Using a bash script to enable access to assistive devices is possible in Mavericks () despite the move to a per-app database. This is useful for entering keystrokes or clicking GUI buttons via a bash script. Prior to OS X Mavericks, enabling access to assistive devices was relatively easy.

Open System Preferences > Security & Privacy > Privacy > Accessibility > 'Click the lock to make changes' > Select 'Cinch' enter image description here.

Running the command sudo touch /private/var/db/.AccessibilityAPIEnabled would enable it. But now each app now needs to be allowed or disallowed access. I often used Applescript/ osascript to simulate keystrokes or click GUI buttons, which was great for automating “un-scriptable” tasks on multiple computers. One particular feature I always found incredibly useful was logging a user in via the loginwindow by sending it a script from a remote machine. This proved useful in a lab environment when I wanted to open a specialized piece of software to make sure it worked on all of the machines. The script would simulate keystrokes and fill in the username and password fields and then press enter or click login.

Unfortunately, Mavericks does not allow Applescript (or more accurately, /usr/bin/osascript ) by default, which is what I used to accomplish this from my script. Trying to run this script returned an error: 62:115: execution error: System Events got an error: osascript is not allowed assistive access.

(-10006) The first thing I tried was to drag /usr/bin/osascript into the Accessibility window of the Security & Privacy Preferences pane, which is how you can add other apps. This did not work as the command-line tool was not an.app. Needless to say, after struggling to figure out how to enable this through a script, I finally found a way. Enable Access To Assistive Devices via bash Each entry in the Accessibility window is actually part of a database file.

Assistive devices for walking

Using sqlite3, this file can be manipulated to add, remove, or modify items. Thank you for the info, Jacob. After digging further, I found that tccutil.py was working exactly as you said – the utility had added and enabled the app in the assistive devices list. But the way ADPassMon is coded, it doesn’t actually check the list. It just asks the user upon first launch to authenticate, adds them to the list and then sets preference telling itself not to check the assistive list in the future. So I added the app to the list via tccutil.ph, then set ADPassMon’s preference via script and then ran “killall cfprefsd” to force the app to re-read its preference file. Thanks again.

How to enable Accessibility in OS X Problem: The first time Dragon Dictate is launched, a dialog box may appear with one of the following messages: Cause: Dragon Dictate requires that Accessibility be enabled in OS X. Solution: Perform the steps below to enable Accessibility in OS X 10.9 or OS X 10.10: • Choose Apple menu at the top left of the screen. • Click System Preferences. • Click Security & Privacy. • Click Privacy. • Click Accessibility. • Click the lock icon at the bottom left of the window.

You will be asked for your administrator password. • Select the checkbox next to Dragon Dictate or Dragon Dictate Medical. • Close System Preferences. Perform the steps below to enable Accessibility in OS X 10.8: • Choose Apple menu at the top left of the screen. • Click System Preferences. • Click Accessibility.

• Select the checkbox next to 'Enable access for assistive devices'. • Note: you will be asked for the Administrator password. • Close System Preferences. Perform the steps below to enable Accessibility in OS X 10.7: • Choose Apple menu at the top left of the screen.

Mac

• Click System Preferences. • Click Universal Access. Best free youtube video downloader • Select the checkbox next to 'Enable access for assistive devices'.

• Note: you will be asked for the Administrator password. • Close System Preferences.