#! /bin/sh set -e if [ -n "$(lsmod 2> /dev/null | grep ^speakup_)" ]; then . /usr/share/debconf/confmodule # Grub mkdir -p /target/etc/default/grub.d echo 'GRUB_INIT_TUNE="480 440 1"' > /target/etc/default/grub.d/brltty.cfg [ -x /target/usr/sbin/update-grub ] && /bin/in-target /usr/sbin/update-grub || true # Gnome 2 /bin/in-target su -s /bin/sh -c "gconftool-2 --type bool --set /desktop/gnome/applications/at/screen_reader_enabled true" Debian-gdm || true # Gnome 3 and Cinnamon mkdir -p /target/usr/share/glib-2.0/schemas cat > /target/usr/share/glib-2.0/schemas/15_speakup.gschema.override < /target/etc/xdg/lightdm/lightdm.conf.d/80_orca-dm-wrapper.conf << EOF [SeatDefaults] greeter-wrapper=/usr/bin/orca-dm-wrapper EOF fi # KDE4 /bin/in-target su -s /bin/sh -c "kwriteconfig --file kaccessibleapp --group Adaptor --key setSpeechEnabled 'true'" kdm || true /bin/in-target su -s /bin/sh -c "kwriteconfig --file kaccessibleapp --group Main --key SpeechEnabled 'true'" kdm || true # KDE5 /bin/in-target su -s /bin/sh -c "kwriteconfig5 --file kaccessrc --group ScreenReader --key Enabled 'true'" kdm || true db_get passwd/username USERNAME="$RET" if [ -n "$USERNAME" ] then # Gnome 2 /bin/in-target su -s /bin/sh -c "gconftool-2 --type bool --set /desktop/gnome/interface/accessibility true" "$USERNAME" || true /bin/in-target su -s /bin/sh -c "gconftool-2 --type bool --set /desktop/gnome/applications/at/visual/startup true" "$USERNAME" || true /bin/in-target su -s /bin/sh -c "gconftool-2 --type bool --set /desktop/gnome/sound/event_sounds true" "$USERNAME" || true # XFCE /bin/in-target su -s /bin/sh -c "mkdir -p /home/$USERNAME/.config/xfce4/xfconf/xfce-perchannel-xml" "$USERNAME" cat > /target/home/$USERNAME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml < END /bin/in-target chown $USERNAME.$USERNAME /home/$USERNAME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml # LXDE, XFCE, LXQt if [ -r "/target/etc/xdg/autostart/orca-autostart.desktop" ]; then /bin/in-target su -s /bin/sh -c "mkdir -p /home/$USERNAME/.config/autostart" "$USERNAME" /bin/in-target su -s /bin/sh -c "cp /etc/xdg/autostart/orca-autostart.desktop /home/$USERNAME/.config/autostart/my-orca-autostart.desktop" "$USERNAME" /bin/in-target su -s /bin/sh -c "sed -i -e 's/OnlyShowIn=.*/OnlyShowIn=XFCE;LXDE;LXQt;/' /home/$USERNAME/.config/autostart/my-orca-autostart.desktop" "$USERNAME" fi # KDE4 /bin/in-target su -s /bin/sh -c "kwriteconfig --file kaccessibleapp --group Adaptor --key setSpeechEnabled 'true'" "$USERNAME" || true /bin/in-target su -s /bin/sh -c "kwriteconfig --file kaccessibleapp --group Main --key SpeechEnabled 'true'" "$USERNAME" || true # KDE5 /bin/in-target su -s /bin/sh -c "kwriteconfig5 --file kaccessrc --group ScreenReader --key Enabled 'true'" "$USERNAME" || true fi fi exit 0