]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Support for spicy and virt-viewer
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 17 Jul 2017 13:53:59 +0000 (10:53 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 17 Jul 2017 13:53:59 +0000 (10:53 -0300)
kvmx
kvmxfile

diff --git a/kvmx b/kvmx
index 58f558aa5ab5cda66864352514a7f1d0dbf88329..463f892383c8feeeeb3be6e5fa6130d9b5027b20 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -207,10 +207,16 @@ function kvmx_spice {
     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
index d70a7428e53783689956ea64713b1b2fd51634d4..c441888ea28d3275938852600630aa8001094ae3 100644 (file)
--- a/kvmxfile
+++ b/kvmxfile
@@ -38,6 +38,9 @@ vnc_client="virt-viewer"
 # Set this if you want to attach an spice client when the machine boots.
 run_spice_client="1"
 
+# SPICE client
+spice_client="spicec"
+
 # Set this if you want to start an xpra session when the machine boots.
 run_xpra="0"