OS X Yosemite: Enable Access for Assistive Devices Command Line

There are apps that require access to assistive devices in Yosemite.  A perfect example of this is TextExpander 4.  It needs the ability to type text on the user’s behalf.  The easiest way to enable access for these items is to drag-and-drop them into the Accessibility section under the Privacy tab in the Security and Privacy pane of System Preferences.

accesstoassistivedevices

This can also be done from the command line via tccutil.py:

sudo tccutil.py --insert com.smileonmymac.textexpander
sudo tccutil.py --insert com.smileonmymac.textexpander.helper

Or you can manually add items using sqlite3 , but the syntax is a little more cumbersome:

sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.smileonmymac.textexpander',0,1,1,NULL);"

It is also more difficult to enable, disable, or remove items, which is why I use tccutil.py:

List existing entries in the Accessibility database

sudo tccutil.py -l

Enable or disable TextExpander

sudo tccutil.py -e com.smileonmymac.textexpander
sudo tccutil.py -d com.smileonmymac.textexpander

Remove Chrome from the Accessibility database

sudo tccutil.py --remove com.google.chrome

tccutil.py works great for scripting or mass deployment of settings in an enterprise environment.

Leave a Reply