# From SUSE Linux
#
# move this file to ~/.xserverrc, if you don't want to allow everybody to
# get access to your X-Server
#

if [ -x /usr/bin/keygen ]; then
    if [ ! -x /usr/bin/hostname -a ! -x /bin/hostname \
	 -a ! -x /usr/bsd/hostname ];
    then
        echo "startx: can't get my hostname - exiting"
	exit 1
    else
	host=`hostname`
    fi

    xauth add $host:0 . `/usr/bin/keygen`
    sleep 2
    xauth add $host/"unix":0 . `/usr/bin/keygen`
    exec X :0 -auth .Xauthority $*
else
    exec X :0 $*
fi
