]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Check for running instance at kvmx_xephyr
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Oct 2017 14:28:33 +0000 (11:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Oct 2017 14:28:33 +0000 (11:28 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 1776d58ea664f59d233698fb712aa42af7ba913d..19142d53205f27284a5f3602f31eaaadfe173dac 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -1070,6 +1070,11 @@ function kvmx_vnc {
 # Connect to the guest using XDMCP/Xephyr
 # See http://jeffskinnerbox.me/posts/2014/Apr/29/howto-using-xephyr-to-create-a-new-display-in-a-window/
 function kvmx_xephyr {
+  if ! kvmx_running; then
+    echo "$BASENAME: guest $VM is not running"
+    exit 1
+  fi
+
   # Clipboard sharing
   # https://ubuntuforums.org/showthread.php?t=1430363
   GUEST_DISPLAY="`cat $DISPLAYFILE`"