VNC (Virtual Network Computing )

Up to now the graphical solutions I've shown were focused on accessing the X desktop. I've also focused on accessing a session exclusively.

On this post I will talk about a tool that is OS independent. You can share a Mac or Windows or Linux desktop and that allows remote collaboration with multiple people looking and controlling the same desktop.

VNC uses the RFB protocol to transmit keyboard and mouse signals to remote computer and receive back the graphical screen.

Most implementations under Linux allow sharing a secondary session but a few allow sharing the main desktop.

My preferred one which is distribution and desktop manager independent is x11vnc

Connecting through VNC

On the server side:
x11vnc -display :0

On the client side
vncviewer hostaddress:0

Of course you can open additional sessions. This is useful when you want to have multiple people working on the same computer on different sessions.
x11vnc -display :1

Sometimes (usually due to port blocking) you need to have the client waiting for the server to open the connection.

To do the reverse VNC the local computer “listens” and the remote computer connects
On the local computer
vncviewer -listen

On the remote computer
x11vnc -connect home-desktop

When connecting to the main desktop there is no additional configuration. But when connecting to an additional session you must specify what kind of session it is.

You do this by modifying the ~/.vnc/xstartup script.

Tunneling VNC over SSH
The VNC protocol opens by default port 5900.

VNC is not an inherently safe protocol so when connecting to a computer using VNC over the open Internet it is advisable to do it over an SSH tunnel

SSH to the remote computer opening the VNC listening port

ssh -L 5900:localhost:5900

Once connected execute the command on the remote console
sudo x11vnc -display :0

On the local computer open a different console

vncviewer localhost:0

Gnome includes a set of VNC server and client that allow sharing the main desktop

The server is called Vino and is located on the main menu under Preferences | Remote desktop

There you can enable it and set other connection parameters

The client is called Vinagre and is located under Internet | Remote desktop viewer

KDE also includes a set of VNC server and client

The server is called kfrb and is located on the main menu under Internet | Desktop Sharing

The client is called krdc and is located on the main menu under Internet | Remote Desktop Client

The KDE client has some nicer features such as scaling and full screen "on the fly"

File Attachments

Attachment Size
vnc.jpg 53.49 KB
vino.png 44.36 KB