Index: trunk/scripts/vnc-client/invirt-vnc-client
===================================================================
--- trunk/scripts/vnc-client/invirt-vnc-client	(revision 1972)
+++ trunk/scripts/vnc-client/invirt-vnc-client	(revision 1973)
@@ -11,5 +11,6 @@
  -l, --listen [HOST:]PORT  port (and optionally host) to listen on for
                            connections (default is 127.0.0.1 and a randomly
-                           chosen port)
+                           chosen port). Use an empty HOST to listen on all
+                           interfaces (INSECURE!)
  -a, --authtoken AUTHTOKEN Authentication token for connecting to the VNC server
  VMNAME                    VM name to connect to (automatically fetches an
@@ -142,6 +143,7 @@
             if ":" in a:
                 listen = a.split(":", 2)
+                listen[1] = int(listen[1])
             else:
-                listen[1] = a
+                listen[1] = int(a)
         elif o in ("-a", "--authtoken"):
             authtoken = a
@@ -191,7 +193,7 @@
         listen[1] = 5900
         ready = False
-        while not ready:
+        while not ready and listen[1] < 6000:
             try:
-                reactor.listenTCP(listen[1], ProxyFactory(connect_host, connect_port, authtoken, machine))
+                reactor.listenTCP(listen[1], ProxyFactory(connect_host, connect_port, authtoken, machine), interface=listen[0])
                 ready = True
             except error.CannotListenError:
