runqemu: add option to make the VNC server publically available
authorRoss Burton <ross.burton@intel.com>
Fri, 8 Feb 2013 11:17:05 +0000 (11:17 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Feb 2013 14:46:09 +0000 (14:46 +0000)
If the qemu is running on a headless machine, a VNC server that only allows
connections from localhost isn't too useful.

Add a "vncpublic" option to bind a VNC server to 0.0.0.0, so it's publically
available.

(From OE-Core rev: 883666821ec46483bbfb9b3cb84c5afa8118a553)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index c20c8dd..6c2a684 100755 (executable)
@@ -33,6 +33,7 @@ usage() {
     echo "    nographic - disables video console"
     echo "    serial - enables a serial console on /dev/ttyS0"
     echo "    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
+    echo "    publicvnc - enable a VNC server open to all hosts"
     echo "  qemuparams=\"xyz\" - specify custom parameters to QEMU"
     echo "  bootparams=\"xyz\" - specify custom kernel parameters during boot"
     echo ""
@@ -172,6 +173,9 @@ while true; do
             KVM_ENABLED="yes"
             KVM_CAPABLE=`grep -q 'vmx\|svm' /proc/cpuinfo && echo 1`
             ;;
+        "publicvnc")
+            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
+            ;;
         "") break ;;
         *)
             # A directory name is an nfs rootfs