exit 1
fi
- # https://lists.freedesktop.org/archives/spice-devel/2013-September/014643.html
- SPICE_NOGRAB=1 spicec --host localhost --port $PORT &> $SPICELOG &
- #spicy -h localhost -p $PORT
- #remote-viewer spice://localhost:$PORT
+ if [ "$spice_client" == "spicy" ] && which spicy &> /dev/null; then
+ spicy -h localhost -p $PORT &
+ elif [ "$spice_client" == "virt-viewer" ] && which virt-viewer &> /dev/null; then
+ remote-viewer spice://localhost:$PORT &
+ else
+ if which spicec &> /dev/null; then
+ # https://lists.freedesktop.org/archives/spice-devel/2013-September/014643.html
+ SPICE_NOGRAB=1 spicec --host localhost --port $PORT &> $SPICELOG &
+ fi
+ fi
SPICEPID="$!"
echo "$SPICEPID" > $SPICEFILE