| Current Path : /var/www/html/mmishra/profile1/shipraag/ |
| Current File : /var/www/html/mmishra/profile1/shipraag/.xserverrc.secure |
#!/bin/bash
#
# move this file to ~/.xserverrc, if you don't want to allow
# everybody to get access to your X-Server
#
dspnum=":0"
args=""
done=no
if test -z "$XAUTHORITY" ; then
auth="$HOME/.Xauthority"
else
auth="$XAUTHORITY"
fi
xf86version="`/usr/X11R6/bin/xf86version`"
if test "$xf86version" == "XFree86-4.x"; then
xprog=X
else
xprog=Xwrapper
fi
while test -n "$1" ; do
case "$1" in
\:[0-9])
dspnum="$1" ; shift ;;
-auth)
done=yes
args="$args $1" ; shift ;;
*)
args="$args $1" ; shift ;;
esac
done
if test -x "`type -p keygen`" -a "$done" != "yes" ; then
if [ ! -x "`type -p hostname`" ] ; then
echo "startx: can't get my hostname - exiting" 1>&2
exit 1
else
host=`hostname -f`
fi
trap "echo" 1 2 15
cookie="MIT-MAGIC-COOKIE-1 `keygen`"
tcpip="$host$dspnum"
unix="${host%%.*}/unix$dspnum"
xauth -f $auth source - <<-EOF
add $tcpip $cookie
add $unix $cookie
add ${host}/unix$dspnum $cookie
EOF
cookie=
exec $xprog $dspnum -auth $auth $args
else
exec $xprog $dspnum $args
fi