. /scripts/live-functions
-log_begin_msg "Configuring accessibility options..."
+if [ -z "${USERNAME}" ]
+then
+ echo "No default user for accessibility options."
+ exit 0
+fi
+
+log_begin_msg "Configuring accessibility options"
# live-initramfs script
# Moderate Visual Impairment
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t string /desktop/gnome/applications/at/visual/exec orca
gct -s -t bool /apps/gksu/disable-grab true
+ gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ if [ -x /root/usr/bin/orca ]
then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ mkdir -p /root/home/${USERNAME}/.orca
+ echo "import orca.settings" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableMagnifier = True" >> /root/home/${USERNAME}/.orca/user-settings.py
+ chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
;;
#gct -s -t bool /desktop/gnome/sound/enable_esd false
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t string /desktop/gnome/applications/at/visual/exec orca
gct -s -t bool /apps/gksu/disable-grab true
+ gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
+
;;
braille=ask)
# Braille
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
+ gct -s -t string /desktop/gnome/applications/at/visual/exec orca
gct -s -t bool /apps/gksu/disable-grab true
+ gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ if [ -x /root/usr/bin/orca ]
then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableBraille/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ mkdir -p /root/home/${USERNAME}/.orca
+ echo "import orca.settings" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableBraille = True" >> /root/home/${USERNAME}/.orca/user-settings.py
+ chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
;;