#!/bin/bash

if [ $# -lt 2 ]; then
    cat <<EOF
Usage: ./`basename $0` command [arguments]
EOF
exit
fi

# Pick a random number for the display port
export DISPLAY=:$RANDOM

# Start an Xvfb instance to catch the graphical output of the program
Xvfb $DISPLAY >/dev/null 2>&1 &

# Run the specified command
eval $@
