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!**
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. Another example for display number 102 is calculation of TCP port 5900 + 102 = 6002. **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 next step. See examples for [Linux/Mac OS](#linuxmac-os-example-of-creating-a-tunnel) and [Windows](#windows-example-of-creating-a-tunnel).
...
@@ -123,8 +124,6 @@ kill 2022
...
@@ -123,8 +124,6 @@ kill 2022
## Windows Example of Creating a Tunnel
## Windows Example of Creating a Tunnel
Use PuTTY to log in on cluster.
Start vncserver using command vncserver described above.
Start vncserver using command vncserver described above.
Search for the localhost and port number (in this case 127.0.0.1:5961).
Search for the localhost and port number (in this case 127.0.0.1:5961).
...
@@ -136,21 +135,35 @@ Search for the localhost and port number (in this case 127.0.0.1:5961).
...
@@ -136,21 +135,35 @@ Search for the localhost and port number (in this case 127.0.0.1:5961).
On the PuTTY Configuration screen go to Connection->SSH->Tunnels to set up the tunnel.
On the PuTTY Configuration screen go to Connection->SSH->Tunnels to set up the tunnel.
Fill the Source port and Destination fields. **Do not forget to click the Add button**.
Fill the Source port and Destination fields. **Do not forget to click the Add button**.


### WSL (Bash on Windows)
[Windows Subsystem for Linux](http://docs.microsoft.com/en-us/windows/wsl) is another way to run Linux software in a Windows environment.
At your machine, create the tunnel:
```console
local $ssh username@login2.cluster-name.it4i.cz -L 5961:localhost:5961
```
## Example of Starting VNC Client
Run the VNC client of your choice, select VNC server 127.0.0.1, port 5961 and connect using VNC password.
Run the VNC client of your choice, select VNC server 127.0.0.1, port 5961 and connect using VNC password.
## Example of Starting TigerVNC Viewer
### TigerVNC Viewer


In this example, we connect to VNC server on port 5961, via the ssh tunnel, using TigerVNC viewer. The connection is encrypted and secured. The VNC server listening on port 5961 provides screen of 1600x900 pixels.
In this example, we connect to VNC server on port 5961, via the ssh tunnel, using TigerVNC viewer. The connection is encrypted and secured. The VNC server listening on port 5961 provides screen of 1600x900 pixels.
## Example of Starting TightVNC Viewer
### TightVNC Viewer
Use your VNC password to log using TightVNC Viewer and start a Gnome Session on the login node.
Use your VNC password to log using TightVNC Viewer and start a Gnome Session on the login node.
...
@@ -162,7 +175,7 @@ You should see after the successful login.
...
@@ -162,7 +175,7 @@ You should see after the successful login.


## Disable Your Gnome Session Screensaver
### Disable Your Gnome Session Screensaver
Open Screensaver preferences dialog:
Open Screensaver preferences dialog:
...
@@ -172,7 +185,7 @@ Uncheck both options below the slider:
...
@@ -172,7 +185,7 @@ Uncheck both options below the slider:


## Kill Screensaver if Locked Screen
### Kill Screensaver if Locked Screen
If the screen gets locked you have to kill the screensaver. Do not to forget to disable the screensaver then.
If the screen gets locked you have to kill the screensaver. Do not to forget to disable the screensaver then.