#!/bin/sh
##################################
#Change these two variables to the WM of your choice.
export WMNAME="Gnome"
export WMEXEC="gnome-session"
##################################
export DISPLAY=:0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export GTK_MODULES=libgtkstylus.so
export PARWIN=`wmctrl -l | grep -i $WMNAME | awk '{print $1}'`
wmctrl -i -r $PARWIN -b toggle,fullscreen
xinit /bin/su user -c 'export DISPLAY=:1; $WMEXEC' -- /usr/bin/Xephyr :1 -br -screen 800x480x16 -dpi 96 -parent $PARWIN +kb +extension Composite -ac
export DISPLAY=:0

