]> gitweb.fluxo.info Git - kvmx.git/commitdiff
VNC: support for virt-viewer
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Apr 2017 17:42:51 +0000 (14:42 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Apr 2017 17:42:51 +0000 (14:42 -0300)
kvmx
kvmxfile

diff --git a/kvmx b/kvmx
index 56e4991bc16f9048289911b5c5dc6c31cc1d1bed..c5bfcd6425bf1265b224a813d7c34997c6cf4abc 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -779,12 +779,16 @@ function kvmx_vnc {
   fi
 
   if [ -z "$vnc_client" ]; then
-    vnc_client="xvncviewer"
+    vnc_client="virt-viewer"
   fi
 
   if which $vnc_client &> /dev/null; then
-    GUEST_DISPLAY="`cat $DISPLAYFILE`"
-    $vnc_client :$GUEST_DISPLAY
+    if [ "$vnclient_client" == "virt-viewer" ]; then
+      $vnc_client vnc://127.0.0.1:$GUEST_DISPLAY
+    else
+      GUEST_DISPLAY="`cat $DISPLAYFILE`"
+      $vnc_client :$GUEST_DISPLAY
+    fi
   else
     echo "$BASENAME: no vnc_client configured"
     exit 1
index 20309f416474dbf7c7b07baad2749848edff270f..988157c28d49baf8f6ade244bf742dfa7276b092 100644 (file)
--- a/kvmxfile
+++ b/kvmxfile
@@ -29,7 +29,8 @@ graphics="-vga qxl"
 # VNC Client
 #vnc_client="xtightvncviewer"
 #vnc_client="xvnc4viewer"
-vnc_client="xvncviewer"
+#vnc_client="xvncviewer"
+vnc_client="virt-viewer"
 
 # Set this if you want to automatically attach an spice client when the machine
 # boots.