X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F30accessibility;h=a1693427efc22e3cb7ec2f69e2f8807d916fa836;hb=268c4f38f81263be2cf7a400b30008cf214bc619;hp=9c20265484395fdf493c6c9af81e3c2127473ef1;hpb=e5ed5f84c8dff7855284b6d37f14da6a2e85f1c5;p=live-boot-grml.git diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility index 9c20265..a169342 100755 --- a/scripts/live-bottom/30accessibility +++ b/scripts/live-bottom/30accessibility @@ -27,7 +27,13 @@ fi . /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 @@ -64,9 +70,13 @@ case ${ACCESS} in gct -s -t bool /desktop/gnome/applications/at/visual/startup true gct -s -t bool /apps/gksu/disable-grab true - if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ] + if type orca > /dev/null 2>&1 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 ;; @@ -77,6 +87,7 @@ case ${ACCESS} in gct -s -t bool /desktop/gnome/interface/accessibility true gct -s -t bool /desktop/gnome/applications/at/visual/startup true gct -s -t bool /apps/gksu/disable-grab true + gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity ;; braille=ask) @@ -84,10 +95,15 @@ case ${ACCESS} in gct -s -t bool /desktop/gnome/interface/accessibility true gct -s -t bool /desktop/gnome/applications/at/visual/startup true 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 type orca > /dev/null 2>&1 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 ;;