diff --git a/docs.it4i/img/dcv_5911_1.png b/docs.it4i/img/dcv_5911_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1b097c2ef74ce358132757099d34f83ff37c9a Binary files /dev/null and b/docs.it4i/img/dcv_5911_1.png differ diff --git a/docs.it4i/img/dcv_5911_2.png b/docs.it4i/img/dcv_5911_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6bb2d6404f04ab1e811d1b12f245005e880658fd Binary files /dev/null and b/docs.it4i/img/dcv_5911_2.png differ diff --git a/docs.it4i/img/dcvtest_5911.png b/docs.it4i/img/dcvtest_5911.png new file mode 100644 index 0000000000000000000000000000000000000000..cc8ef8e0f882111691d4f7051439ef640de64412 Binary files /dev/null and b/docs.it4i/img/dcvtest_5911.png differ diff --git a/docs.it4i/img/vizsrv_5911.png b/docs.it4i/img/vizsrv_5911.png new file mode 100644 index 0000000000000000000000000000000000000000..d9aff04fccd06c8fc5c57977fb882186dde217da Binary files /dev/null and b/docs.it4i/img/vizsrv_5911.png differ diff --git a/docs.it4i/img/vizsrv_logout.png b/docs.it4i/img/vizsrv_logout.png new file mode 100644 index 0000000000000000000000000000000000000000..f89ff34252586954c0435d65ed0d277645dfe9d5 Binary files /dev/null and b/docs.it4i/img/vizsrv_logout.png differ diff --git a/docs.it4i/software/viz/NICEDCVsoftware.md b/docs.it4i/software/viz/NICEDCVsoftware.md index b0b2787302e4725b01691e160e8699303abcc265..7a4c0b331e60b7fd9aa866e5ea6a791cd2bef781 100644 --- a/docs.it4i/software/viz/NICEDCVsoftware.md +++ b/docs.it4i/software/viz/NICEDCVsoftware.md @@ -7,165 +7,186 @@ **Install VPN client** [VPN Access][1] -!!! note - Visualisation server is a compute node. You are not able to SSH with your private key. There are two solutions available to solve login issue. - -## Windows Users - -**Solution 1 - Add the public fingerprint** +## How to Use -* Generate public fingerprint for your private key with PuTTYgen +Read our documentation on [VNC server][3]. - +**Run VNC** -* Add this key to `~/.ssh/authorized_keys` on the cluster +* Login to Salomon - - -* Use your standard SSH key to connect to visualization server - -**Solution 2 - Copy private key from the cluster** +```console +[username@yourPC]$ ssh -i path/to/your_id_rsa user@login1.salomon.it4i.cz +``` -* Install WinSCP client (user-computer) [Download WinSCP installer][c] -* Add credentials +* Run Job on Salomon - +```console +[user@login1]$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv1,walltime=04:00:00 -N Vizserver1 +``` -* Add path to key file +Or - +```console +[user@login1]$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv2,walltime=04:00:00 -N Vizserver2 +``` -* Save -* Copy `~/.ssh/id_rsa` to your computer -* Convert key to PuTTY format with PuTTYgen +You are connected to Vizserv1(2) now. - +```console +[yourusername@vizserv2 ~]$ +``` -* Use this new ssh key to connect to visualization server +**VNC Server** -**Install PuTTY** +* Create VNC Server Password -* [Overview][2] -* [Download PuTTY installer][d] -* Configure PuTTY +!!! note + VNC server password should be set before the first login to VNC server. Use a strong password. - +```console +[yourusername@vizserv2 ~]$ vncpasswd +password: +verify: +``` -* Add credentials and key file (create 3x sessions: **vizserv1.salomon.it4i.cz**, **vizserv2.salomon.it4i.cz**, **login1.salomon.it4i.cz**) -* Config SSH tunnels (user-computer) (for sessions vizserv1 and vizserv2 only) - ports: **5901**, **5902**, **7300-7305** +* Check the display number of the connected users - +```console +[yourusername@vizserv2 ~]$ ps aux | grep Xvnc | sed -rn 's/(\s) .*Xvnc.* (\:[0-9]+) .*/\1 \2/p' +username :15 +username :61 +..... +``` -* Save +!!! note + The VNC server runs on port 59xx, where xx is the display number. To get your port number, simply add 5900 + display number, in our example 5900 + 11 = 5911. **Calculate your own port number and use it instead of 5911 from examples below**. -**Run VPN client** [VPN IT4Innovations][f] (user-computer) +* Start your remote VNC server -**Login to Salomon via PuTTY** (user-computer) +!!! note + Choose the display number which is different from other users display number. Also remember that display number should be lower or equal 99. ```console -$ ssh salomon.it4i.cz +[yourusername@vizserv2 ~]$ vncserver :11 -geometry 1600x900 -depth 24 +Running applications in /etc/vnc/xstartup +VNC Server signature: f0-3d-df-ee-6f-a4-b1-62 +Log file is /home/yourusername/.vnc/vizserv2:11.log +New desktop is vizserv2:11 (195.113.250.204:11) ``` -**Remove ~/.vnc/xstartup** - -**Run job** +* Check the display number ```console -$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv1,walltime=04:00:00 -N Vizserver1 -$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv2,walltime=04:00:00 -N Vizserver2 +[yourusername@vizserv2 ~]$ ps aux | grep Xvnc | sed -rn 's/(\s) .*Xvnc.* (\:[0-9]+) .*/\1 \2/p' +username :15 +username :61 +yourusername :11 +..... ``` -**Run vncserver on vizservX** +!!! note + You started new VNC server. Server is listening on port 5911 (5900 + 11 = 5911). -* check existing vncservers in /tmp/.X11-unix/X\* (rm /tmp/.X11-unix/X1 /tmp/.X11-unix/X2) -* vizserv1: vncserver :1 -geometry 2540x1380 -depth 24 -* vizserv2: vncserver :2 -geometry 2540x1380 -depth 24 -* set password for vncserver +Your VNC server is listening on port 59xx, in our example on port 5911. -**Login to vizservX via PuTTY (vizserv1/vizserv2) with tunnels** (user-computer) +**VNC Client (your local machine)** -**Run NICE DCV** (user-computer) +!!! note + You are going to connect your local machine to remote VNC server. -* vizserv1: localhost:5901 -* vizserv2: localhost:5902 -* fill password +* Create the ssh tunnel (on your local machine) for 59xx port, plus for the range of ports 7300-7305 - - +```console +[username@yourPC]$ ssh -i path/to/your_id_rsa -TN -f user@vizserv2.salomon.it4i.cz -L 5911:localhost:5911 -L 7300:localhost:7300 -L 7301:localhost:7301 -L 7302:localhost:7302 -L 7303:localhost:7303 -L 7304:localhost:7304 -L 7305:localhost:7305 +``` -**Check DCV status (Salomon-vizservX) in VNC window** +For the Windows users use Putty [Download PuTTY installer][d] for ssh tunnel creation; follow an instruction here [VNC server][3]. -**Run glxgears (Salomon-vizservX)** +* Run NICE DCV or one of the recommended clients (on your local machine) - +Recommended clients are [TightVNC][f] or [TigerVNC][g] (free, open source, available for almost any platform). -**LOGOUT FROM MENU: System->Logout** +* localhost:59xx +* fill password -## Linux Users + + -**Config SSH tunnels (user-computer)** +**Test the OpenGL functionality on Vizserv** -* ports: 5901, 5902, 7300-7305 -* vizserv1 +* Run the command in VNC terminal ```console -$ ssh -i ~/salomon_key -TN -f user@vizserv1.salomon.it4i.cz -L 5901:localhost:5901 -L 7300:localhost:7300 -L 7301:localhost:7301 -L 7302:localhost:7302 -L 7303:localhost:7303 -L 7304:localhost:7304 -L 7305:localhost:7305 +[kub0393@vizserv2 ~]$ /apps/easybuild/glxgears ``` -* vizserv2 + + +**Test the NICE DCV functionality** + +* Run the command in VNC terminal ```console -$ ssh -i ~/salomon_key -TN -f user@vizserv2.salomon.it4i.cz -L 5902:localhost:5902 -L 7300:localhost:7300 -L 7301:localhost:7301 -L 7302:localhost:7302 -L 7303:localhost:7303 -L 7304:localhost:7304 -L 7305:localhost:7305 +[kub0393@vizserv2 ~]$ dcvtest ``` -**Run VPN client** [VPN IT4Innovations][e] (user-computer) + -**Login to Salomon** (user-computer) +## Stop the Service Correctly After Finishing Work -```console -$ ssh salomon.it4i.cz -``` +**On VNC server site** -**Remove ~/.vnc/xstartup** +* Logout from your local VNC window -**Run job** + -```console -$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv1,walltime=04:00:00 -N Vizserver1 -$ qsub -I -q qviz -A OPEN-XX-XX -l select=1:ncpus=4:host=vizserv2,walltime=04:00:00 -N Vizserver2 -``` +**On your local machine** -**Run vncserver on vizservX** +* PID of your ssh tunel -* check existing vncservers in /tmp/.X11-unix/X\* (rm /tmp/.X11-unix/X1 /tmp/.X11-unix/X2) -* vizserv1: vncserver :1 -geometry 2540x1380 -depth 24 -* vizserv2: vncserver :2 -geometry 2540x1380 -depth 24 -* set password for vncserver +```console +[username@yourPC]$ netstat -natp | grep 5911 +(Not all processes could be identified, non-owned process info +will not be shown, you would have to be root to see it all.) +tcp 0 0 127.0.0.1:5911 0.0.0.0:* LISTEN 5675/ssh +tcp6 0 0 ::1:5911 :::* LISTEN 5675/ssh +``` -**Run SSH (vizserv1/vizserv2) with tunnels** (user-computer) +Or -**Run NICE DCV** (user-computer) +```console +[username@yourPC]$ lsof -i :5911 +COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME +ssh 5675 user 5u IPv6 571419 0t0 TCP ip6-localhost:5911 (LISTEN) +ssh 5675 user 6u IPv4 571420 0t0 TCP localhost:5911 (LISTEN) +``` -* vizserv1: localhost:5901 -* vizserv2: localhost:5902 -* fill password +!!! note + PID in our example is 5675. You also need use correct port number for both command above, 5911 is correct port number in our example. - - +* Kill the process (PID = Process ID) -**Check DCV status in VNC window** +```console +[username@yourPC]$ kill 5675 +``` -**Run glxgears** +!!! note + Your PID is different from PID in our example. - +* Windows users -**LOGOUT FROM MENU: System->Logout** +Close Putty. [1]: ../../general/accessing-the-clusters/vpn-access.md [2]: ../../general/accessing-the-clusters/shell-access-and-data-transfer/putty.md +[3]: ../../general/accessing-the-clusters/graphical-user-interface/vnc.md [a]: https://aws.amazon.com/hpc/dcv/ [b]: https://www.nice-dcv.com/2016-0.html [c]: https://winscp.net/eng/download.php [d]: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html [e]: https://vpn.it4i.cz/user +[f]: http://www.tightvnc.com +[g]: http://sourceforge.net/apps/mediawiki/tigervnc/index.php?title=Main_Page +