# Universal Access command line?



## Matt OS X (Apr 13, 2009)

I'm hoping you guys can help me out here:

I'm a Technician at a campus which requires Active Directory to log in with campus username. So this means when a client logs in a mac and this creates a profile under "User" folder instead of local account.

Now, there's a client who have usher syndrome and prefers to use Universal access's "White on Black" display (contrast). When he enabled the "White on Black" displays on and logged out. When he logs back on and the "white on Black" display has been turned off and shows colored (normal) display. He does not like the idea of enabling the "white on black" every single time when logging in. 

I examined and found out the "white on black" contrasts works with local account profile but not through AD's profile?

Is there a way to enable 'permanent' "white on Black" display with Terminal.app command line for AD user? 

Thanks in advance.


----------



## macbri (Apr 13, 2009)

Hi Matt OS X -

I don't know of a command line to do this, and although this isn't quite what what you asked for, how about a small Applescript app which will invert the colors for you?


```
tell application "System Events"
    key code 28 using ¬
        {control down, option down, command down}
end tell
```

(note the line continuation character -- the "key code" command is all one line).

Save this as a run-only app, and then add it as a login item for the user.  I don't have AD to check, but with this as a login item for me,  the colors invert every time I login -- login once, they're inverted.  Login again, they're back to normal...  So perhaps for an AD account where it "forgets" everything was inverted, it might do the trick?


----------



## Matt OS X (Apr 14, 2009)

It worked! But! One condition- when i close the lid to sleep and open to wake up and once it connects with wireless (Airport) and it turned back to color screen?


----------



## macbri (Apr 14, 2009)

So can you clarify -- when the laptop wakes from sleep and reconnects, does the little applescript app re-run and therefore change the colours back, or does the system do this when it reconnects *without* the applescript getting re-run?

By the way, there's no need to duplicate the thread.


----------



## Matt OS X (Apr 15, 2009)

macbri- Yes, the applescript app re-run and changed the colors back to black/white then you wait for like 30 seconds for MacBook to recognize and bind to the Wi-Fi automatically, when it does -That's when it changed back to color display.


----------



## macbri (Apr 16, 2009)

Again I have no AD setup here for me to examine, but on my laptop with a local user account, changes to the display colours (normal or inverted) are saved in:

~/Library/Preferences/com.apple.CoreGraphics.plist

If you "default read com.apple.CoreGraphics DisplayUseInvertedPolarity" you should get 0 when normal colours are displayed, and 1 when they're inverted.  

Is it possible this user doesn't have sufficient permissions to modify his/her version of the file, if it's held on a central AD server for example?  This might explain why everything reverts after logout.  If this were the problem, fixing it would negate the need for the applescript....


----------

