The **Virtual Network Computing** (**VNC**) is a graphical [desktop sharing](http://en.wikipedia.org/wiki/Desktop_sharing"Desktop sharing") system that uses the [Remote Frame Buffer protocol (RFB)](http://en.wikipedia.org/wiki/RFB_protocol"RFB protocol") to remotely control another [computer](http://en.wikipedia.org/wiki/Computer"Computer"). It transmits the [keyboard](http://en.wikipedia.org/wiki/Computer_keyboard"Computer keyboard") and [mouse](http://en.wikipedia.org/wiki/Computer_mouse") events from one computer to another, relaying the graphical [screen](http://en.wikipedia.org/wiki/Computer_screen"Computer screen") updates back in the other direction, over a [network](http://en.wikipedia.org/wiki/Computer_network"Computer network").
The **Virtual Network Computing** (**VNC**) is a graphical [desktop sharing](http://en.wikipedia.org/wiki/Desktop_sharing"Desktop sharing") system that uses the [Remote Frame Buffer protocol (RFB)](http://en.wikipedia.org/wiki/RFB_protocol"RFB protocol") to remotely control another [computer](http://en.wikipedia.org/wiki/Computer"Computer"). It transmits the [keyboard](http://en.wikipedia.org/wiki/Computer_keyboard"Computer keyboard") and [mouse](http://en.wikipedia.org/wiki/Computer_mouse") events from one computer to another, relaying the graphical [screen](http://en.wikipedia.org/wiki/Computer_screen"Computer screen") updates back in the other direction, over a [network](http://en.wikipedia.org/wiki/Computer_network"Computer network").
Vnc-based connections are faster (require less network bandwidth) then [X11](x-window-system) applications forwarded directly through ssh.
Vnc-based connections are usually faster (require less network bandwidth) then [X11](x-window-system) applications forwarded directly through ssh.
The recommended clients are [TightVNC](http://www.tightvnc.com) or [TigerVNC](http://sourceforge.net/apps/mediawiki/tigervnc/index.php?title=Main_Page)(free, open source, available for almost any platform).
The recommended clients are [TightVNC](http://www.tightvnc.com) or [TigerVNC](http://sourceforge.net/apps/mediawiki/tigervnc/index.php?title=Main_Page)(free, open source, available for almost any platform).
In this chapter we show how to create an underlying ssh tunnel from your client machine to one of our login nodes. Then, how to start your own vnc server on our login node and finally how to connect to your vnc server via the encrypted ssh tunnel.
## Create VNC Password
## Create VNC Password
!!! note
!!! note
...
@@ -22,9 +24,10 @@ Verify:
...
@@ -22,9 +24,10 @@ Verify:
!!! note
!!! note
To access VNC a local vncserver must be started first and also a tunnel using SSH port forwarding must be established.
To access VNC a local vncserver must be started first and also a tunnel using SSH port forwarding must be established.
[See below](#linuxmac-os-example-of-creating-a-tunnel) for the details on SSH tunnels. In this example we use display number 61.
[See below](#linuxmac-os-example-of-creating-a-tunnel) for the details on SSH tunnels.
You can find display numbers which are already occupied on the login2. Here you can see that displays " /usr/bin/Xvnc :79" and " /usr/bin/Xvnc :60" are occupied.
You should start by **choosing your display number**.
To choose free one, you should check currently occupied display numbers - list them using command:
The vncserver runs on port 5900 + display number. You get your port number simply as 5900 + display number (in this example 61), so the result is 5961.
The VNC server runs on port 59xx, where xx is the display number. So, you get your port number simply as 5900 + display number, in our example 5900 + 61 = 5961. **Please, calculate your own port number and use it instead of 5961 from examples below!**
To access the VNC server you have to create a tunnel between the login node using TCP port 5961 and your machine using a free TCP port (for simplicity the very same) in next step. See examples for [Linux/Mac OS](#linuxmac-os-example-of-creating-a-tunnel) and [Windows](#windows-example-of-creating-a-tunnel).
To access the VNC server you have to create a tunnel between the login node using TCP **port 5961** and your machine using a free TCP port (for simplicity the very same, in this case). See examples for [Linux/Mac OS](#linuxmac-os-example-of-creating-a-tunnel) and [Windows](#windows-example-of-creating-a-tunnel).
!!! note
!!! note
The tunnel must point to the same login node where you launched the VNC server, eg. login2. If you use just cluster-name.it4i.cz, the tunnel might point to a different node due to DNS round robin.
The tunnel must point to the same login node where you launched the VNC server, eg. login2. If you use just cluster-name.it4i.cz, the tunnel might point to a different node due to DNS round robin.
...
@@ -188,6 +201,11 @@ Or this way:
...
@@ -188,6 +201,11 @@ Or this way:
[username@login2 .vnc]$pkill vnc
[username@login2 .vnc]$pkill vnc
```
```
!!! note
Do not forget to terminate also SSH tunnel, if it was used. Look on end of [this section](#linuxmac-os-example-of-creating-a-tunnel) for the details.
## GUI Applications on Compute Nodes Over VNC
## GUI Applications on Compute Nodes Over VNC
The very same methods as described above, may be used to run the GUI applications on compute nodes. However, for maximum performance, proceed following these steps:
The very same methods as described above, may be used to run the GUI applications on compute nodes. However, for maximum performance, proceed following these steps: