config_model=%%LOCALBASE%%/etc/gdm/dconf.proto
if [ `id -u` = 0 ]
then
	exit 0
fi
t=/tmp/$$
cd $HOME
if [ ! -f .gnome_inited  -a -f $config_model ]
then
	rm -rf .config/dconf .config/gconf
	dconf load / < ${config_model}
	date > .gnome_inited
	rm -rf .dmrc
	(
	echo "[Desktop]"
	echo "Session=mate"
	if [ -n "$LANG" ]
	then
		echo "Language=$LANG"
	else
		echo "Language=pt_BR.UTF-8"
	fi
	) > .dmrc
	dconf load / <  ${config_model}
	for i in $(jot 10 1)
	do
		echo ${i}0
		sleep 1
	done | zenity --text=INSTALL --no-cancel --auto-close --progress
	exit 0
fi
#export PULSE_SERVER=/var/run/pulse/native
setxkbmap -option "terminate:ctrl_alt_bksp"
rm -f ${HOME}/.config/libreoffice/.lock
rm -f /tmp/$$
sync
