noVNC in ubuntu not working

5,507

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
Share:
5,507

Related videos on Youtube

user2612587
Author by

user2612587

Updated on September 18, 2022

Comments

  • user2612587
    user2612587 over 1 year

    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..

    • Nowak Grzegorz
      Nowak Grzegorz over 10 years
      what happened when you ran the vncserver command that I mentioned?
    • user2612587
      user2612587 over 10 years
      @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
    • Nowak Grzegorz
      Nowak Grzegorz over 10 years
      are you using an encrypted connection? If so, be sure to generate a self-signed ssl certificate and follow other instructions here
    • user2612587
      user2612587 over 10 years
      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
      user2612587 over 10 years
      @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 ?
    • Nowak Grzegorz
      Nowak Grzegorz over 10 years
      I really don't know enough about that solution to say... perhaps you could ask a separate question and get an answer about that
    • user2612587
      user2612587 over 10 years
      @MikePennington sure thing, thanks for all your help!