3

I cloned noVNC to my local vm:

$ git clone git://github.com/kanaka/noVNC

then I just ran what they said on their README.md

Use the launch script to start a mini-webserver and the WebSockets proxy (websockify). The --vnc option is used to specify the location of a running VNC server:

./utils/launch.sh --vnc localhost:5901

Point your browser to the cut-and-paste URL that is output by the launch script. Enter a password if the VNC server has one configured. Hit the Connect button and enjoy!

Which gets me here:

enter image description here

but when I hit connect, it says Server disconnected(code 1006) and in the server output in the terminal it says ignoring socket not ready.

Things I have tried:

sudo netstat -lnp --tcp --udp

to get the open ports and it shows the 6080 port as listening but it doesnt show 5901 as listening, which I am not sure if its even supposed to as 5091 would be the socket not the port..

  • what happened when you ran the vncserver command that I mentioned? – Mike Pennington Dec 7 '13 at 21:28
  • @MikePennington think its getting closer as now it says starting handshake, and then it fails. I followed the walkthrough and my vnc server is running and configured just how the walkthrough says. But when I access my ipaddress and port :5901 on the browser nothing happens, I made sure to add rules to the firewall just like tutorial mentioned.. I get a RFB 003.008 – user2612587 Dec 7 '13 at 21:55
  • are you using an encrypted connection? If so, be sure to generate a self-signed ssl certificate and follow other instructions here – Mike Pennington Dec 7 '13 at 22:11
  • ok thats what it was.. I ended up using x11vnc with no password or anything and it worked, later I have to work on the security. thanks – user2612587 Dec 7 '13 at 22:12
  • @MikePennington hey, quick question is it possible for a user to show his desktop using a vnc server and novnc ? i.e let say when i go to the site i want to click the button and show my screen rather than connecting to the computer where the vnc server is running on.. Sort of like deadsimplescreensharing.com ? – user2612587 Dec 7 '13 at 22:31
4

I am not sure if its even supposed to as 5091 would be the socket not the port

I'm assuming you mean 5901, instead of 5091 because TCP/5901 is what VNC uses by default for display number 1.

First, be sure to generate a self-signed ssl certificate and follow other instructions here.

Then, you simply need to run the VNC server itself before you start noVNC. After you've ensured that VNC is installed, run this command in another window before you run ./utils/launch.sh --vnc localhost:5901

$ nohup vncserver -localhost -depth 24 -geometry 1200x900 :1 &
$ ## Be sure that VNC is running on port 5901...
$ netstat -an | grep 590.
$ ## Now you can launch noVNC
$ ./utils/launch.sh --vnc localhost:5901

I chose 1200x900 and 24 bit color for you, but you can use anything you like...

Use this to stop your VNC server...

$ vncserver -kill :1

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.