X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F30accessibility;h=51780d2ebb2498b287ef56f82cf8f6f14b4fa606;hb=refs%2Ftags%2Fupstream%2F1.156.1;hp=6b61db1d4d968ae9a010929772c1bd9489dc6b30;hpb=845dee811a0159b75422eb7e4cfb6c860d39690b;p=live-boot-grml.git diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility index 6b61db1..51780d2 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 @@ -41,6 +47,15 @@ gct () fi } +laptop_detect () +{ + if chroot /root /usr/sbin/laptop-detect + then + echo "orca.settings.orcaModifierKeys = orca.settings.LAPTOP_MODIFIER_KEYS" >> /root/home/$USERNAME/.orca/user-settings.py + echo "orca.settings.keyboardLayout = orca.settings.GENERAL_KEYBOARD_LAYOUT_LAPTOP" >> /root/home/$USERNAME/.orca/user-settings.py + fi +} + case ${ACCESS} in access=v1) # Lesser Visual Impairment @@ -62,13 +77,18 @@ case ${ACCESS} in # 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 type orca > /dev/null 2>&1 + if [ -x /root/usr/bin/orca ] then mkdir -p /root/home/${USERNAME}/.orca - echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/orca-customizations.py - echo "orca.settings.enableMagnifier = True" >> /root/home/${USERNAME}/.orca/orca-customizations.py + 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 + laptop_detect + chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca fi ;; @@ -78,22 +98,28 @@ case ${ACCESS} in #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 type orca > /dev/null 2>&1 + if [ -x /root/usr/bin/orca ] then mkdir -p /root/home/${USERNAME}/.orca - echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/orca-customizations.py - echo "orca.settings.enableBraille = True" >> /root/home/${USERNAME}/.orca/orca-customizations.py + 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 + laptop_detect + chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca fi ;;