Enabling assistive devices no longer requires GUI password #180

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@vitorgalvao
Contributor

Changed the code so it no longer needs the GUI password prompt.
Code taken from http://hints.macworld.com/article.php?story=20060203225241914

@mathiasbynens
Owner

Ah, this deprecates #175? I see.

@vitorgalvao
Contributor

Yes. Being relatively new at git, the pull request at the time was directly from the master branch. I closed that one and opened this one as a better practice of applying changes to a different branch.

@mathiasbynens
Owner

Does this code work for you?

I tested this as follows:

  1. Open System Preferences → Accessibility, and uncheck “Enable access for assistive devices”.
  2. Close the System Preferences window.
  3. sudo touch /private/var/db/.AccessibilityAPIEnabled
  4. Open System Preferences → Accessibility, and look for the “Enable access for assistive devices” checkbox.

The checkbox was still unchecked.

@vitorgalvao
Contributor

Yes, it works well for me (Mountain Lion), even following the steps you outlined.

During your test, did you verify if /private/var/db/.AccessibilityAPIEnabled was appearing/disappearing? If you try it again, after unchecking the box verify via terminal if /private/var/db/.AccessibilityAPIEnabled is still there. If it is, the box will probably still be checked.

Bear in mind that as sudo touch /private/var/db/.AccessibilityAPIEnabled works to check the box, sudo rm /private/var/db/.AccessibilityAPIEnabled also works to uncheck it.

On the other hand, you seem to have the reverse problem (could it have something to do with how you activated it the first time? It seems unlikely to me, but I started doing this on a clean install, if I recall correctly). Still, it may be worth another try, as I can confirm it works for me.

@vitorgalvao vitorgalvao closed this May 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment