#! /bin/sh

if [ -n "$(lsmod | grep ^speakup_)" ]; then
	. /usr/share/debconf/confmodule

	/bin/in-target su -s /bin/sh -c "gconftool-2 --type bool --set /desktop/gnome/applications/at/screen_reader_enabled true" Debian-gdm || true
	db_get passwd/username
	USERNAME="$RET"
	if [ -n "$USERNAME" ]
	then
		/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
	fi
fi

exit 0
