diff options
Diffstat (limited to 'tests/virtualfb.sh')
-rwxr-xr-x | tests/virtualfb.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/virtualfb.sh b/tests/virtualfb.sh new file mode 100755 index 0000000..3c0cf0e --- /dev/null +++ b/tests/virtualfb.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ "`command -v Xvfb`" ]; then + VFB_BINARY=Xvfb +fi + +if [ "`command -v Xvnc`" ]; then + VFB_BINARY=Xvnc +fi + +if [ ! $VFB_BINARY ]; then + echo "$0 Failed, cannot find Xvfb or Xvnc" + exit 1 +fi + +DISPLAY=:98 +$VFB_BINARY $DISPLAY -screen 0 800x600x24 &> virtualfblog & +echo PID=$! " " +echo DISPLAY=$DISPLAY +# trap "kill -KILL $xpid ||:" EXIT +export DISPLAY +sleep 3 |