Source

Fireplace / run-xephyr

Full commit
#!/bin/sh

if [ -z $SERVER ] ; then
  SERVER=Xephyr
fi
if [ -z $ARGS ] ; then
  ARGS="-host-cursor -nodri -wr"
fi

if [ -z $display ] ; then
  display=':3'
fi

export XAUTHORITY=${HOME}/.Xauthority.FireplaceTest
MCOOKIE=$(mcookie)
xauth add $(hostname)/unix$display . $MCOOKIE
xauth add localhost/unix$display . $MCOOKIE
xinit "$@" -- /usr/bin/$SERVER $display $ARGS
# startx -- `which Xnest` $display
xauth remove $(hostname)/unix$display localhost/unix$display

exit 0