This file is indexed.

/usr/lib/ubiquity/target-config/30accessibility is in ubiquity-casper 1.376.

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
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/sh
# If you are looking to change accessibility profile settings, please look in
# bin/casper-a11y-enable.

. /usr/share/debconf/confmodule
. /etc/casper.conf

PREREQ=""
DESCRIPTION="Configuring accessibility options..."
db_get passwd/username
TARGET_USERNAME="$RET"

setup_profile()
{
	if [ -n "$PROFILE_NAME" ] &&
	   [ -d /target/usr/share/a11y-profile-manager/profiles/$PROFILE_NAME ] &&
	   [ -x /usr/bin/a11y-profile-manager ] &&
	   [ -x /usr/bin/dconf ] &&
	   [ -x /target/usr/bin/dconf ]; then
		mkdir -p /target/tmp/user-a11y-profile-settings.d
		/usr/bin/a11y-profile-manager -s $PROFILE_NAME -D /target/tmp/user-a11y-profile-settings.d/01-profile
		if [ -n "$COPY_ORCA_CONFIG" ] &&
		   [ -x /target/usr/bin/orca ]; then
			su -c "/usr/bin/dconf dump /org/gnome/orca/ | \
			      sed -e 's@\[/\]@\[org/gnome/orca\]@g' -e 's@\[profile/@\[org/gnome/orca/profile/@g' \
			      > /home/$USERNAME/02-orca" $USERNAME
			cp /home/$USERNAME/02-orca /target/tmp/user-a11y-profile-settings.d
			if [ -x /target/usr/sbin/unity-greeter ]; then
				mkdir -p /target/tmp/greeter-a11y-profile-settings.d
				cat <<EOF > /target/tmp/greeter-a11y-profile-settings.d/01-greeter
[com/canonical/unity-greeter]
screen-reader=true
EOF
				cp /home/$USERNAME/02-orca /target/tmp/greeter-a11y-profile-settings.d
			elif [ -x /target/usr/sbin/lightdm-gtk-greeter ]; then
				mkdir -p /target/tmp/greeter-a11y-profile-settings.d
				cp /home/$USERNAME/02-orca /target/tmp/greeter-a11y-profile-settings.d
			fi
		fi

		if [ -n "$UG_SETTING" ] &&
		   [ -x /target/usr/sbin/unity-greeter ]; then
			mkdir -p /target/tmp/greeter-a11y-profile-settings.d
			cat <<EOF > /target/tmp/greeter-a11y-profile-settings.d/01-greeter
[com/canonical/unity-greeter]
$UG_SETTING=true
EOF
		fi

		if [ -n "$LGTK_VAR" ] &&
		   [ -x /target/usr/sbin/lightdm-gtk-greeter ]; then
			# If there is a better way to do this, I'm not currently aware of it.
			mkdir -p /target/var/lib/lightdm/.cache/lightdm-gtk-greeter
			cat <<EOF > /target/var/lib/lightdm/.cache/lightdm-gtk-greeter/state
[a11y-states]
$LGTK_VAR=true
EOF
			chroot /target chown -R lightdm.lightdm /var/lib/lightdm/.cache
		fi

		chroot /target /usr/bin/dconf compile /tmp/dconf.user /tmp/user-a11y-profile-settings.d
		mkdir -p /target/home/$TARGET_USERNAME/.config/dconf
		mv /target/tmp/dconf.user /target/home/$TARGET_USERNAME/.config/dconf/user
		chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.config

		if [ -d /target/tmp/greeter-a11y-profile-settings.d ]; then
			chroot /target /usr/bin/dconf compile /tmp/dconf.greeter /tmp/greeter-a11y-profile-settings.d
			mkdir -p /target/var/lib/lightdm/.config/dconf
			mv /target/tmp/dconf.greeter /target/var/lib/lightdm/.config/dconf/user
			chroot /target chown -R lightdm.lightdm /var/lib/lightdm/.config
		fi

		if [ -d /target/tmp/user-a11y-profile-settings.d ]; then
			rm -r /target/tmp/user-a11y-profile-settings.d
		fi
		if [ -d /target/tmp/greeter-a11y-profile-settings.d ]; then
			rm -r /target/tmp/greeter-a11y-profile-settings.d
		fi
		if [ -f /home/$USERNAME/01-profile ]; then
			rm /home/$USERNAME/01-profile
		fi
		if [ -f /home/$USERNAME/02-orca ]; then
			rm /home/$USERNAME/02-orca
		fi
	fi
}

for x in $(cat /proc/cmdline); do
	case $x in
		# Lesser Visual Impairment
		access=v1)
			PROFILE_NAME=high-contrast
			UG_SETTING=high-contrast
			setup_profile
			exit
                        ;;
		# Blindness
		access=v3)
			PROFILE_NAME=blindness
			COPY_ORCA_CONFIG=true
			setup_profile
			exit
                        ;;
		# Braille
		braille=ask)
			PROFILE_NAME=braille
			COPY_ORCA_CONFIG=true
			setup_profile
			exit
                        ;;
		# Minor Motor Difficulties
		access=m1)
			PROFILE_NAME=motor-difficulties
			setup_profile
			exit
                        ;;
		# Motor Difficulties - pointing devices
		access=m2)
			PROFILE_NAME=onscreen-keyboard
			UG_SETTING=onscreen-keyboard
			setup_profile
			exit
                        ;;
		esac
done

# Check the live user GSettings for the active profile if any.
A11Y_PROFILE="$(su -c 'gsettings get com.canonical.a11y-profile-manager active-profile' $USERNAME \
		| sed -e s/\'//g)"

case "$A11Y_PROFILE" in
	# Lesser Visual Impairment
	*high-contrast)
		PROFILE_NAME=$A11Y_PROFILE
		UG_SETTING=high-contrast
		LGTK_VAR=contrast
		setup_profile
		exit
		;;
	# Blindness
	*blindness)
		PROFILE_NAME=$A11Y_PROFILE
		COPY_ORCA_CONFIG=true
		LGTK_VAR=reader
		setup_profile
		exit
		;;
	# Braille
	*braille)
		PROFILE_NAME=$A11Y_PROFILE
		COPY_ORCA_CONFIG=true
		LGTK_VAR=reader
		setup_profile
		exit
		;;
	# Minor Motor Difficulties
	*motor-difficulties)
		PROFILE_NAME=$A11Y_PROFILE
		setup_profile
		exit
		;;
	# Motor Difficulties - pointing devices
	*onscreen-keyboard)
		PROFILE_NAME=$A11Y_PROFILE
		UG_SETTING=onscreen-keyboard
		LGTK_VAR=keyboard
		setup_profile
		exit
		;;
esac