Need to disable VoiceOver shortcut and TextToSpeech

Contributor II

We have 900 MacBook Airs, running 10.11.6, in a 1:1 environment. We are preparing to do state testing on them after spring break. During trials, we found out that students used VoiceOver and Text-to-Speech to read the test questions to them. Unless they have an accommodation for that, we need to prohibit that behavior.

I've written a script that disables the things that need to get disabled, but a reboot is required in order to make them stick:


USER=$(w | grep console | awk '{print $1}')

#Set TextToSpeech hotkey to something else
/usr/libexec/PlistBuddy /Users/$USER/Library/Preferences/ -c "set :SpokenUIUseSpeakingHotKeyCombo 2055" 

#Turn off TextToSpeech
/usr/libexec/PlistBuddy /Users/$USER/Library/Preferences/ -c "set :SpokenUIUseSpeakingHotKeyFlag false"

#Disable Cmd-F5 hotkey for voiceover
/usr/libexec/PlistBuddy /Users/$USER/Library/Preferences/ -c "set:AppleSymbolicHotKeys:59:enabled false"

exit 0

The complicating factor is that we're running Deep Freeze, and these settings are in the frozen system partition. So, if we reboot, the settings revert, and the script is useless.

How do I use launchctl to reboot the services to make these take effect immediately?

I think

killall -SIGHUP

will take care of the speech setting, but how do I reboot the keyboard shortcuts (cmd-F5), so VoiceOver is suspended?

I am using Configuration Profiles to make sure the relevant Preference Panes are gray out.

Thanks in advance!


New Contributor II

Have you tried

killall SystemUIServer

This should have the desired effect

Contributor II

Thanks for the idea, but it had no effect.