Commit ef847b27 authored by Pavel Jirásek's avatar Pavel Jirásek
Browse files

Merge branch 'vnc-win-bash' into 'master'

Vnc win bash

See merge request sccs/docs.it4i.cz!204
parents 93cc8119 23ef2986
......@@ -30,9 +30,9 @@ You should start by **choosing your display number**.
To choose free one, you should check currently occupied display numbers - list them using command:
```console
[username@login2 ~]$ ps aux | grep Xvnc
username 5971 0.0 0.0 201072 92564 ? SN Sep22 4:19 /usr/bin/Xvnc :79 -desktop login2:79 (username) -auth /home/vop999/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /home/username/.vnc/passwd -rfbport 5979 -fp catalogue:/etc/X11/fontpath.d -pn
username 10296 0.0 0.0 131772 21076 pts/29 SN 13:01 0:01 /usr/bin/Xvnc :60 -desktop login2:61 (username) -auth /home/vop999/.Xauthority -geometry 1600x900 -depth 16 -rfbwait 30000 -rfbauth /home/vop999/.vnc/passwd -rfbport 5960 -fp catalogue:/etc/X11/fontpath.d -pn
[username@login2 ~]$ ps aux | grep Xvnc | sed -rn 's/(\s) .*Xvnc (\:[0-9]+) .*/\1 \2/p'
username :61
username :102
.....
```
......@@ -44,7 +44,7 @@ Based on this **we have choosen display number 61** for us, so this number you c
!!! note
Your situation may be different so also choose of your number may be different. **Please choose and use your own display number accordingly!**
Start your VNC server on choosen display port (61):
Start your VNC server on choosen display number (61):
```console
[username@login2 ~]$ vncserver :61 -geometry 1600x900 -depth 16
......@@ -55,7 +55,7 @@ Starting applications specified in /home/username/.vnc/xstartup
Log file is /home/username/.vnc/login2:1.log
```
Check whether VNC server is running on choosen port (61):
Check whether VNC server is running on choosen display number (61):
```console
[username@login2 .vnc]$ vncserver -list
......@@ -69,13 +69,14 @@ X DISPLAY # PROCESS ID
Another way to check it:
```console
[username@login2 .vnc]$ ps aux | grep Xvnc
[username@login2 .vnc]$ ps aux | grep Xvnc | sed -rn 's/(\s) .*Xvnc (\:[0-9]+) .*/\1 \2/p'
username 10296 0.0 0.0 131772 21076 pts/29 SN 13:01 0:01 /usr/bin/Xvnc :61 -desktop login2:61 (username) -auth /home/vop999/.Xauthority -geometry 1600x900 -depth 16 -rfbwait 30000 -rfbauth /home/username/.vnc/passwd -rfbport 5961 -fp catalogue:/etc/X11/fontpath.d -pn
username :61
username :102
```
!!! note
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).
......@@ -123,8 +124,6 @@ kill 2022
## Windows Example of Creating a Tunnel
Use PuTTY to log in on cluster.
Start vncserver using command vncserver described above.
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).
tcp 0 0 127.0.0.1:5961 0.0.0.0:* LISTEN 24031/Xvnc
```
### PuTTY
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**.
![](../../../img/putty-tunnel.png)
### 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.
## Example of Starting TigerVNC Viewer
### TigerVNC Viewer
![](../../../img/vncviewer.png)
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.
......@@ -162,7 +175,7 @@ You should see after the successful login.
![](../../../img/gnome_screen.png)
## Disable Your Gnome Session Screensaver
### Disable Your Gnome Session Screensaver
Open Screensaver preferences dialog:
......@@ -172,7 +185,7 @@ Uncheck both options below the slider:
![](../../../img/gdmdisablescreensaver.png)
## 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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment