/usr/share/initramfs-tools/scripts/casper-bottom/30accessibility is in casper 1.394.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | #!/bin/sh
# If you are looking to change accessibility profile settings, plesae look in
# bin/casper-a11y-enable.
PREREQ=""
DESCRIPTION="Configuring accessibility options..."
prereqs()
{
echo "$PREREQ"
}
# Args: $1 - The profile name
setup_profile()
{
if [ -d /root/usr/share/a11y-profile-manager/profiles/$1 ] &&
[ -x /root/usr/bin/a11y-profile-manager ] &&
[ -x /root/usr/bin/dconf ]; then
mkdir -p /root/tmp/a11y-profile-casper.d
chroot /root /usr/bin/a11y-profile-manager -s $1 -i -D /tmp/a11y-profile-casper.d/01-profile
chroot /root /usr/bin/dconf compile /tmp/dconf.$USERNAME /tmp/a11y-profile-casper.d
mkdir -p /root/home/$USERNAME/.config/dconf
mv /root/tmp/dconf.$USERNAME /root/home/$USERNAME/.config/dconf/user
chroot /root chown $USERNAME.$USERNAME -R /home/$USERNAME/.config
rmdir /root/tmp/a11y-profile-casper.d
fi
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
. /scripts/casper-functions
log_begin_msg "$DESCRIPTION"
for x in $(cat /proc/cmdline); do
case $x in
# Lesser Visual Impairment
access=v1)
setup_profile high-contrast
;;
# Moderate Visual Impairment
access=v2)
setup_profile magnifier
;;
# Blindness
access=v3)
NO_A11Y_DESKTOP_FILE=1
setup_profile blindness
;;
# Braille
braille=ask)
setup_profile braille
;;
# Minor Motor Difficulties
access=m1)
setup_profile keyboard-modifiers
;;
# Motor Difficulties - pointing devices
access=m2)
setup_profile onscreen-keyboard
;;
esac
done
# Write out a desktop file that will be triggered if the screen-reader-enabled
# gsettings key is enabled, to set up the screen reader profile. This key
# is enabled if the user launches orca with a shortcut key. We don't want
# to write out the file if the user is running oem-config, or boots directly
# into ubiquity, where there is code to deal with the setting of the profile.
if [ -z "$NO_A11Y_DESKTOP_FILE" ] &&
[ -x /root/usr/bin/a11y-profile-manager ]; then
PROFILE_NAME=$(basename /root/usr/share/a11y-profile-manager/profiles/*blindness)
cat <<EOF > /root/etc/xdg/autostart/screen-reader-profile.desktop
[Desktop Entry]
Type=Application
Name=Screen Reader Accessibility Profile
Exec=/usr/bin/a11y-profile-manager -s $PROFILE_NAME -i
NoDisplay=true
AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-reader-enabled
X-GNOME-AutoRestart=false
OnlyShowIn=GNOME;MATE;Unity;
EOF
fi
log_end_msg
|