;;
esac
-# live-initramfs header
+# live-boot header
if [ -n "${NOACCESSIBILITY}" ]
then
log_begin_msg "Configuring accessibility options"
-# live-initramfs script
+# live-boot script
gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
chroot /root update-gconf-defaults
}
+add_sudoers_file ()
+{
+
+cat <<EOF > /root/etc/sudoers.d/a11y-sudo
+# TO allow accessibility in GTK to work with sudo.
+Defaults env_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"
+EOF
+
+ chmod 0440 /root/etc/sudoers.d/a11y-sudo
+}
+
case ${ACCESS} in
access=v1)
# Lesser Visual Impairment
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
- sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
+ add_sudoers_file
if [ -x /root/usr/bin/orca ]
then
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 string /apps/empathy/conversation/theme classic
gct -s -t bool /apps/gksu/disable-grab true
gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
- sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
+ add_sudoers_file
remove_applet fast_user_switch
- if [ -x /root/usr/bin/pulse-session ]
- then
- touch /root/home/$USERNAME/.pulse_a11y_nostart
- chroot /root chown $USERNAME.$USERNAME /home/$USERNAME/.pulse_a11y_nostart
- mkdir -p /root/home/$USERNAME/.pulse
- echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
- chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
- fi
if [ -x /root/usr/bin/orca ]
then
mkdir -p /root/home/$USERNAME/.orca
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
- sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
+ gct -s -t string /apps/empathy/conversation/theme classic
+ add_sudoers_file
if [ -x /root/usr/bin/orca ]
then
chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
- if [ -x /root/usr/bin/pulse-session ]
- then
- touch /root/home/$USERNAME/.pulse_a11y_nostart
- chroot /root chown $USERNAME.$USERNAME /home/$USERNAME/.pulse_a11y_nostart
- mkdir -p /root/home/$USERNAME/.pulse
- echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
- chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
- fi
-
remove_applet fast_user_switch
;;