Getting my head around websockify/noVNC

757 views
Skip to first unread message

Dave Thomas

unread,
Aug 9, 2021, 5:11:05 PM8/9/21
to noVNC
Sorry for such a stupid question, but here's what I want to do:
x11vnc server running on machine 1.
Desktop viewable from other machines on same internal network using web browser

I like to avoid running anything additional on the machine 1 (the one with x11vnc server).  Is it possible, like running websockify running on machine 2 (windows)?

I've installed websockify (and noVnc) on my windows desktop (machine 2).  Machine 2 can currently view machine 1 desktop using a vncviewer.  But, when I run websockify speciying machine 1 ip as source, I get a complaint:

WARNING: no 'resource' module, daemonizing is disabled
WebSocket server settings:
  - Listen on 192.168.50.100:5900
  - No SSL/TLS support (no cert file)
Traceback (most recent call last):
  File "C:\Users\davet\AppData\Local\Programs\Python\Python39\Scripts\websockify-script.py", line 33, in <module>
    sys.exit(load_entry_point('websockify==0.10.0', 'console_scripts', 'websockify')())
  File "C:\Users\davet\AppData\Local\Programs\Python\Python39\lib\site-packages\websockify-0.10.0-py3.9.egg\websockify\websocketproxy.py", line 696, in websockify_init
    server.start_server()
  File "C:\Users\davet\AppData\Local\Programs\Python\Python39\lib\site-packages\websockify-0.10.0-py3.9.egg\websockify\websockifyserver.py", line 704, in start_server
    lsock = self.socket(self.listen_host, self.listen_port, False,
  File "C:\Users\davet\AppData\Local\Programs\Python\Python39\lib\site-packages\websockify-0.10.0-py3.9.egg\websockify\websockifyserver.py", line 470, in socket
    sock.bind(addrs[0][4])
OSError: [WinError 10049] The requested address is not valid in its context

Do I have to run websockify on machine #1 (where the x11vnc server is running), or am I just invoking websockify incorrectly?

Thanks!

Dave Thomas

unread,
Aug 9, 2021, 5:58:43 PM8/9/21
to noVNC
Maybe I just have target and source IPs confused?  When I switch them, I see this:

C:\websockify-master>websockify 127.0.0.1:6000 192.168.50.100:5900
WARNING: no 'resource' module, daemonizing is disabled
WebSocket server settings:
  - Listen on 127.0.0.1:6000
  - No SSL/TLS support (no cert file)
  - proxying from 127.0.0.1:6000 to 192.168.50.100:5900

But, when I use a Chrome browser pointing to the novnc html, it just hangs. 

Bruce Slusser

unread,
Aug 10, 2021, 11:00:01 AM8/10/21
to noVNC
Hello,

It looks to me like your missing the NoVNC web server in your websockify command. So for me I have in my root C drive a fodler for NoVNC and in there i have the NoVNC-web and Websockify-master folders. I then invoke websockify like this:

C:\websockify-master>websockify :8080 192.168.50.100:5900 --web C:\NoVNC\NoVNC-web

I don't specify my host server IP, just the port. And result (keep in mind i am using tokens instead of VNC Server IP in picture below, but should look like this:
2021-08-10_10h59_42.png
Regards!
Reply all
Reply to author
Forward
0 new messages