#!/bin/ash
if [ $(id -u) -eq 0 ]; then
	{ cp $XAUTHORITY /root/spot/.Xauthority;
	chown spot:spot /root/spot/.Xauthority; } 2> /dev/null
	XAUTHORITY=/root/spot/.Xauthority exec su spot -c "thunderbird $@"
fi
exec thunderbird "$@"
