10

can someone provide a step by step for vnc setup on ubuntu 10.10 desktop. I have ssh access to it at the moment with root user.

I tried installing vnc4server package, then after that did a vncpasswd with root and setup a password of 7characters and once of 6characters.

Then forwarded vnc ports via ssh tunnels but at first it gave me the prompt to type vnc password and won't accept, now it just won't connect.

name of my ubuntudesktop = ubuntuhome (192.168.1.22) name of my remote machine from where i want to connect from is = lockerpc

Which port shall I add in "Source and Destination" in Putty > SSH > Tunnels ?

in source I inputted localhost:5901 and in Destination IP Address 192.168.1.22:5900 (the private IP of my UbuntuDesktop

I can successfully ssh but not vnc. will be grateful for your help. Please if you can write the steps down for this scenario, as i have gone through a whole lot of links and its all very confusing.

Kind regards

Jorge Castro
  • 73,717
Mutahir
  • 801

4 Answers4

6

I did not see from your description that you started the vnc server.

vncserver :1 -name "My-Server" -geometry 1600x1100

don't do that as root tho. Run is as a regular user. I have a similar post for setting up vnc4server on SuperUser.com: connecting via VNC

Now for the putty setup, the Source port should be 5901 and the Destination should be localhost:5901

When you connect from windows your command should look like this:

vncviewer.exe -connect Server:1
5

I don't bother with any of the server jazz. I install x11vnc on the remote computer, connect to it by ssh, forwarding back the port and then just connect locally (to the forwarded port).

Here's the SSH command I use:

ssh oli@192.168.0.4 -L 5900:localhost:5900 "x11vnc -display :0 -noxdamage"

Once that's running, I just start my VNC client and connect to localhost:5900

You can script this to do one then the other. I'd tell you what I do but this is running on my phone and the client is different.

Oli
  • 299,380
0

There is two part in your question :

  • You should have vnc running on your computer.
  • You should create a tunnel that allow you to access it.

It's easier if you can test on the network where the machine is installed.

Starting vnc

Regarding the first part, I personally use vino. There is a quick setup guide for vino.

Install vino:

sudo apt-get install vino

Configure vino:

vino-preferences

By default, it open this windows :

alt text

If you can redirect your display, you can make that windows pop on another computer. If not, you'll need to check the vino man page to find out how to make the same configuration .

You start the server with :

/usr/lib/vino/vino-server

Once you connected to your VNC, I suggest you enter this command in your Autostarted Apps to start vino server.

There several tool out there. I used vino because it is the simplest to use (in my knowledge).

Tunnel

Regarding the second part of the question. The local port is what ever you feel like. By convention, we try to make the local and remote port the same. You will need to specify the port if you use something different.

The remote port is where your server is running. If you are using vino, it's localhost:5900 (unless you configure something else).

0

I find x11vnc very nice and easy to get quickly started. Just took 3 steps to get it installed:

  1. Install x11vnc:

    $ sudo apt-get install x11vnc
    
  2. Run x11vnc:

    $ x11vnc
    ...
    The VNC desktop is:      sun:0
    PORT=5900
    
  3. From another box VNC to this above box.

kenorb
  • 10,944