From Documentation
Jump to: navigation, search
m (VNC)
(MobaXterm (Windows))
 
(108 intermediate revisions by 8 users not shown)
Line 1: Line 1:
= VNC =
+
=Visualization Stations=
  
[http://en.wikipedia.org/wiki/Virtual_Network_Computing VNC], or Virtual Network Computing, allows one to access a graphical interface on a remote computer system across a network.
+
SHARCNET also has a collection of remote-desktop machines running CentOS and Fedora.  These can be used to run a variety of pre- and post-processing packages that are not a good fit for the cluster environment.  They are accessed over the network via [http://en.wikipedia.org/wiki/Virtual_Network_Computing VNC].  Sessions are not persistent.  When you logout or get disconnected, they end.
  
Compared to NX client, there are two main differences in functionality:
+
When switching between <b>CentOS</b> and <b>Fedora</b> environments you need to reset your configuration files because versions of several programs coniguration files differ and may become confused when the environment changes.  For instance if the <b>Application Menu</b> pulldown is missing from the vdi-centos6 desktop after running a fedora23 desktop.  To fix this problem run the following command on any of the clusters:
#no ability to maintain a persistent session: when you log out, your VNC session ends
+
#cut and paste between the local host and the VNC client needs to be enabled by running ''vncconfig'' within the VNC client, from the commmand line, and keeping the vncconfig window open
+
  
== noVNC (web browser) ==
+
rm -fr ~/.config ~/.local ~/.cache ~/.gconf ~/.gnome2
  
noVNC is a HTML5 VNC client that runs inside a web browser. You can find the links in our [https://www.sharcnet.ca/my/systems systems page] under 'Visualization Workstations': just click on a blue icon next to the workstation name to connect. Your web browser needs to be fairly modern to support the advanced features of HTML5. Currently, we are testing noVNC on two machines ([https://novnc.sharcnet.ca/noVNC/vnc_auto.html?host=viz1-uwaterloo.user.sharcnet.ca&port=6443 viz1-uwaterloo] and [https://novnc.sharcnet.ca/noVNC/vnc_auto.html?host=viz6-uoguelph.user.sharcnet.ca&port=6443 viz6-uoguelph]), and it'll be propagated to the rest of the visualization workstations in the near future.  Note that one cannot cut-and-paste between their local host and the noVNC session; if one desires this functionality it is recommended that they use a stand-alone VNC client.
+
The clipboard is only shared if you are running a VNC client that supports this (TigerVNC). The program that handles this on the remote end is called ''vncconfig''.  It is automatically started in ''-nowin'' mode.  To change the options you will have to kill it and then restart it in none ''-nowin'' mode
  
== ssvnc (local client) ==
+
killall vncconfig
 +
vncconfig
  
We tested [http://www.karlrunge.com/x11vnc/ssvnc.html ssvnc] client on Linux, MacOS, and Windows. Other clients supporting VeNCrypt should work as well; here we provide instructions for ssvnc. The address viz1-uwaterloo.user.sharcnet.ca below can be changed to any other visualization workstation.
+
== Web Browser (noVNC) ==
  
=== ssvnc on Linux ===
+
noVNC is a HTML5 based VNC client that runs inside a web browser.  It enables connecting to any sharcnet visualization workstation remotely from any modern browser (one that supports HTML5).  To do so simply goto the sharcnet [https://www.sharcnet.ca/my/systems systems page], then scroll down to the Visualization Systems table, next locate the machine you want to connect with such as vdi-centos6 and lastly click the <font size="2" color="blue">BLUE</font> terminal icon beside it. The remote desktop login screen should appear in your browser. If however the chosen viz machine is under heavy load, you may receive a timeout message instead of connecting successfully and should consider trying later or connecting to a different machine.  It maybe necessary to try 3x before a successful connection is established.  The local VNC client approach does not have this issue.
  
Download a unix_only version from http://www.karlrunge.com/x11vnc/ssvnc.html#download, unpack it, and then run the command:
+
WARNING! It is not possible to copy/paste text between your workstation desktop and a web browser noVNC session. A workaround is to copy/paste the text into a file located on a global shared filesystem such as home of the noVNC session - then from your workstation desktop connect to a sharcnet system and copy/paste from the remote file to your desktop.   A better solution is instead of using no VNC connect instead using a local VNC client as described below where copy/paste actions to the desktop are natively supported.
  
/path/to/your/ssvnc/bin/ssvnc_cmd -proxy vencrypt://viz1-uwaterloo.user.sharcnet.ca:5900 viz1-uwaterloo.user.sharcnet.ca:0
+
== Local Client (VNC) ==
  
=== ssvnc on MacOS ===
+
The local client provides a slightly faster solution that may integrate better with your system (e.g., pass through certain keystrokes that would otherwise be captured by your browser and do full screen mode better).  While any vencrypt enabled VNC viewer should work, we have experienced difficulties with many of them and therefore recommend the following three.
  
Download a no_windows version from http://www.karlrunge.com/x11vnc/ssvnc.html#download, unpack it, and then in the Terminal.app (found under /Applications/Utilities) run the commands:
+
Also note that connecting to the visualization stations via the local clients should be done to the ''<station>.user.sharcnet.ca'' address (e.g., ''viz4-uwo.user.sharcnet.ca'') and not that standard ''<station>.sharcnet.ca'' address or else your client will not be able to properly verify the authenticity of the remote machine.
  
export UNAME=Darwin.i386
+
=== TigerVNC Installation ===
/path/to/your/ssvnc/bin/ssvnc_cmd -proxy vencrypt://viz1-uwaterloo.user.sharcnet.ca:5900 viz1-uwaterloo.user.sharcnet.ca:0
+
  
=== ssvnc on Windows ===
+
Tigervnc clients for various compute architectures can be downloaded from https://bintray.com/tigervnc/stable/tigervnc/. <br>
 +
To remain compatible with the systems you are connecting to. it is strongly recommended to update to the latest version periodically.
  
Download a windows_only version from http://www.karlrunge.com/x11vnc/ssvnc.html#download and unpack it. Navigate to ssvnc\Windows and run sshvnc. When a window opens up, press Options, and then press Mode. Switch the mode from the default "SSH-Only (sshvnc)" to "'''''SSHVNC'''''". A newer larger configuration window will open. Set VNCHost:Display to '''''viz1-uwaterloo.user.sharcnet.ca:0''''' and Proxy/Gateway to '''''vencrypt://viz1-uwaterloo.user.sharcnet.ca:5900''''' . Check "'''''Use SSL'''''" and uncheck "'''''Verify All Certs'''''", and finally press Connect.
+
==== Windows and MacOS Installations ====
  
= NX Client =
+
Download either the TigerVNC ''dmg'' file for MacOS or the vncviewer ''exe'' file for Windows from https://bintray.com/tigervnc/stable/tigervnc/.
  
'''Please note:''' The supported remote graphical access tools are now noVNC (VNC via a web browser) and VNC. NX is still available on visualization workstations that are running the older operating system image, but it will no longer be available once the systems are upgraded (October 4 2013). 
+
==== Fedora Linux Installation ====
  
== What is NX Client? ==
+
For Fedora, the tigervnc client is available in the default packages
  
NX Client is a program which allows you to remotely connect to a virtual desktop on an X11 computer in a similar manner to VNC. NX Client has several advantages over both Xming/PuTTY and VNC however, including:
+
  sudo yum install tigervnc
  
* Connection is streamed through an SSH connection for increased security
+
In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in <code>~/.vnc</code>:
* Eliminates a lot of X11's latency issues, making interfaces way more responsive, even over cable modem/ADSL connections
+
* Gives you your own private login session that is not accessible to others. (VNC merely lets you control the screen remotely, and anyone at the workstation can see what you are doing, and take control back.  NX Client avoids this problem.)
+
* Provides you with a real X session hosted on the remote system, using the remote system's hardware, meaning you do not need to install a local X server to run it, and the capabilities of the remote system are used for your session.
+
* Preserves your session if you are accidentally disconnected!  If your network connection is disconnected or your computer is shut down due to an accident, your session on the remote computer will not be killed - instead it will be returned to you once you log back in, with your programs still running.  Xming can not do this.
+
  
== Java NX Client ==
+
rm -fr ~/.vnc
 +
mkdir -p ~/.vnc
 +
ln -s /etc/pki/tls/certs/ca-bundle.crt ~/.vnc/x509_ca.pem
  
If your web browser supports it, you can run the Java NX launcher directly from our [http://agvs.sharcnet.ca/nx/ website] (this downloads the appropriate client for you and installs in a plugin directory on your machine). Just
+
NOTE: Removing ''~/.vnc'' resets the TigerVNC configuration and may be required for this to work.
  
# click the ''desktop'' icon for the machine you wish to connect to,
+
==== Ubuntu and Debian Linux Installations ====
# tell your browser it is okay to run the ''NX Web Companion'' application (if it asks),
+
# press the ''continue'' button when it comes up and says it is read to run,
+
# enter your SHARCNET login and password and press ''login''.
+
  
If it says that the maximum number of concurrent sessions have been reached for this sever, the machine you have picked already has too many people connected to it.  You can try again later or pick another.
+
For newer Ubuntu/Debian:
  
== Binary NX Client ==
+
sudo apt-get install tigervnc-viewer
  
You can obtain the binary NX client program by going to [http://www.nomachine.com/ http://www.nomachine.com/] and entering their Download area.  Go to the NX Client Products section (the client is free), and choose the one that best matches your workstation.  You should not need the "fonts" packages unless you are running a very old program on the Viz terminals, and are having difficulties.
+
In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in <code>~/.vnc</code>:
  
Once you have downloaded the nxclient installer, run it, and it will create a "NX Client for Windows" icon on your desktop. Run this program, and you will be taken to a set of configuration screens, where we can create our first Session - this will make an icon on the desktop for us to choose so that we don't need to configure the session every time we start the programFirst, choose a session name, and enter the Host name of the Viz Terminal you wish to connect to. (In this example, we use viz2-uoit.sharcnet.ca)
+
  rm -fr ~/.vnc
 +
  mkdir -p ~/.vnc
 +
ln -s /etc/ssl/certs/ca-certificates.crt ~/.vnc/x509_ca.pem
  
[[File:NXClient-0.png|frame|center]]
+
NOTE: Removing ''~/.vnc'' resets the TigerVNC configuration and may be required for this to work.
  
After filling those in, click "Next" and choose the GNOME session and 1024x768 as your screen size - while it is possible to use larger screen sizes on larger monitors, for connections from home via DSL or cable modem especially, keeping the size limited will make the program run much more smoothly:
+
==== Gentoo Linux Installation ====
  
[[File:NXClient-1.png|frame|center]]
+
To install TigerVNC <code>emerge tigervnc</code> after setting any desired [https://wiki.gentoo.org/wiki/TigerVNC USE flags]:
  
Now click on "Next" until finished, and you will be given the NX "Login" window as below:
+
emerge -av net-misc/tigervnc
  
[[File:NXClient-2.png|frame|center]]
+
In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in <code>~/.vnc</code>:
  
In the future, you only need to click on the desktop icon you created to log in this way, rather than setting it up againEnter your username and password, then click the "Login" button, and NX Client will connect to the remote machine (as long as it is on) and give you a desktop that looks just like the one you would get if you were at the machine itself:
+
cd ~/.vnc
 +
  ln -s /etc/ssl/certs/ca-certificates.crt x509_ca.pem
  
[[File:NXClient-3.png|frame|center]]
+
==== Running ====
  
'''IMPORTANT NOTE''':  When logging out of your NX Client session, always do it by logging out of the local machine - in the menus along the top of the virtual screen, choose "Session", then "Log Out (your userid)" to log out.
+
Once tigervnc is installed on your computer, connect to a SHARCNET viz station by simply clicking the <i>TigerVNC Viewer</i> application menu entry located typically under  <i>Applications->Internet</i>. Once the Connection Details popup appears type <b><i>vdi-centos6.user.sharcnet.ca</i></b> in the VNC server: field. The hostname should be saved for next time but if not click the "Save As" button in the popup preferences and save it as a loadable configuration for the next time you start the viewer. If you cannot locate <i>tigerVNC Viewer</i> in your application menu on linux try opening a terminal and running  the following command:
 +
 +
vncviewer vdi-centos6.user.sharcnet.ca
  
[[File:NXClient-4.png|frame|center]]
+
where <I>vdi-centos6</i> could be replaced with <I>viz10-uwo</I>, <I>viz11-uwo</I>, <i>vdi-fedora23</i> etc.
  
= Xming Software =
+
==== Re-Sizing the Display ====
  
== What is Xming? ==
+
To put the vncviewer client window into full screen mode, there are three options to try:
  
Xming is an X11 server that can be run on your local Windows desktop computer - it will allow you to run graphical applications from remote Unix and Linux computers such as the SHARCNET clusters, when used in combination with an SSH client. 
+
1) Click the maximize/minimize button in the upper right hand corner of the client
 +
2) Press the F8 key to open a popup window and tick/untick the <I>Full screen</I> check box
 +
3) If neither 2 or 3 work run the snxrandr command and specify a setting such as 1280x800
  
== Where to get Xming ==
+
=== gvncviewer (older Ubuntu/Debian) ===
 +
 
 +
Older Ubuntu and Debian do not package tigervnc by default, so we instead recommend installing the gvncviewer application
 +
 
 +
apt-get install gvncviewer
 +
 
 +
The gvncviewer program will not prompt you for connecting to machines it cannot verify (it just quits), so it is necessary to provide it with a link to the system certificates
 +
 
 +
mkdir -p ~/.pki/CA
 +
ln -s /etc/ssl/certs/ca-certificates.crt ~/.pki/CA/cacert.pem
 +
 
 +
Connecting to a viz stations is then done by running
 +
 
 +
gvncviewer <station>.user.sharcnet.ca
 +
 
 +
where ''<station>'' is substituted with the appropriate viz station name.
 +
 
 +
=Clusters=
 +
 
 +
Some software on SHARCNET system requires you to establish a graphical connection, so you can interact with it through a graphical user interface (GUI).
 +
 
 +
If such a graphical connection is not enabled, the program which requires it (in this example DDT), will generate an error message:
 +
 
 +
[ppomorsk@orc-login2:~] module load ddt
 +
[ppomorsk@orc-login2:~] ddt
 +
ddt: cannot connect to X server
 +
[ppomorsk@orc-login2:~]
 +
 
 +
Resolving this issue requires that a graphical connection is set up.  There is a number of ways to do this.
 +
 
 +
==SSH (Linux and Mac)==
 +
 
 +
Add the ''-X'' (or for a very few applications the less secure ''-Y'') flag to your ssh command to enable X11 forwarding (from the cluster to your computer)
 +
 
 +
ssh -X <user>@<cluster>
 +
 
 +
For MacOS you will also need to install the [https://support.apple.com/en-ca/HT201341 XQuartz] X11 server to display the forwarded the graphics from the cluster.  Further information to enable forwarding is explained [http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-leopard/ here].
 +
 
 +
==MobaXterm (Windows)==
 +
 
 +
MobaXterm is a combined ssh, sftp, and built-in X11 server from Windows.  It is available as a free download from [http://mobaxterm.mobatek.net/ mobaxterm.mobatek.net].  A convenient tutorial on its use is given on that page.  To enable a graphical connection, make sure the box "X11-Forwarding" is checked.  Please note using MobaXterm will not provide a high performance graphics connection to visualization machine, thus it is not optimal to use in cases where refresh and response rates are an issue, such as performing interactive 3d modelling or meshing operations in a remotely run gui application. Powerful visualization machines usually run vnc servers, and so we recommend using tigervnc.
 +
 
 +
== Xming Software (Windows) ==
 +
 
 +
Xming is an X11 server that can be run on your local Windows desktop computer - it will allow you to run graphical applications from remote Unix and Linux computers such as the SHARCNET clusters, when used in combination with an SSH client.  Similar to MobaXterm, be aware that Xming will not provide a high performance graphics connection to sharcnet visualization machines such as vdi-centos6 or gra-vdi, for this we recommend using tigervnc.  For example when performing heavy interactive 3d meshing tasks within a remotely run gui application.
 +
 
 +
=== Where to get Xming ===
  
 
Xming is available from [http://www.straightrunning.com/XmingNotes/ http://www.straightrunning.com/XmingNotes/], where a variety of versions can be downloaded.  For a fee, you can download the latest version, or a slightly older, but still functional version is avaliable for free.  Of the two free versions, one is the basic "Xming" server, and the second, "Xming-mesa", allows you to make use of 3D graphics if they are used by the remote application.  This tutorial will work under the assumption that you have downloaded the free version, labeled "Xming-mesa", since it will do all of the work that the basic Xming program does, and in situations where a program requires 3D graphics support, it is better to have it already, rather than finding out when your program will not run.
 
Xming is available from [http://www.straightrunning.com/XmingNotes/ http://www.straightrunning.com/XmingNotes/], where a variety of versions can be downloaded.  For a fee, you can download the latest version, or a slightly older, but still functional version is avaliable for free.  Of the two free versions, one is the basic "Xming" server, and the second, "Xming-mesa", allows you to make use of 3D graphics if they are used by the remote application.  This tutorial will work under the assumption that you have downloaded the free version, labeled "Xming-mesa", since it will do all of the work that the basic Xming program does, and in situations where a program requires 3D graphics support, it is better to have it already, rather than finding out when your program will not run.
  
== How to Install and Use Xming ==
+
=== How to Install and Use Xming ===
  
 
To install Xming, first download the Xming-mesa public domain from [http://www.straightrunning.com/XmingNotes/ The Website], and run it.  For the majority of the setup options, you should accept the default, and just click "Next &gt;".  When asked to Select Components, make sure "Normal PuTTY Link SSH client" is selected, and turn on all checkboxes, as below:
 
To install Xming, first download the Xming-mesa public domain from [http://www.straightrunning.com/XmingNotes/ The Website], and run it.  For the majority of the setup options, you should accept the default, and just click "Next &gt;".  When asked to Select Components, make sure "Normal PuTTY Link SSH client" is selected, and turn on all checkboxes, as below:
Line 103: Line 150:
 
[[File:Xming-3.png|frame|center]]
 
[[File:Xming-3.png|frame|center]]
  
=== PuTTy SSH client ===
+
==== PuTTY SSH client ====
 +
 
 
Next, if you do not already have a copy of the PuTTY SSH client, you can get one from [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here] - download the putty.exe program file, and place it on your desktop for easy access, no installation is needed for this program.  Once it is downloaded, run it, and you will be presented with the configuration screen.  For this example, we will connect to the system rainbow.sharcnet.ca, but the same instructions can be used for any of the clusters, simply by changing the Host Name you use.
 
Next, if you do not already have a copy of the PuTTY SSH client, you can get one from [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here] - download the putty.exe program file, and place it on your desktop for easy access, no installation is needed for this program.  Once it is downloaded, run it, and you will be presented with the configuration screen.  For this example, we will connect to the system rainbow.sharcnet.ca, but the same instructions can be used for any of the clusters, simply by changing the Host Name you use.
  

Latest revision as of 14:32, 22 November 2019

Visualization Stations

SHARCNET also has a collection of remote-desktop machines running CentOS and Fedora. These can be used to run a variety of pre- and post-processing packages that are not a good fit for the cluster environment. They are accessed over the network via VNC. Sessions are not persistent. When you logout or get disconnected, they end.

When switching between CentOS and Fedora environments you need to reset your configuration files because versions of several programs coniguration files differ and may become confused when the environment changes. For instance if the Application Menu pulldown is missing from the vdi-centos6 desktop after running a fedora23 desktop. To fix this problem run the following command on any of the clusters:

rm -fr ~/.config ~/.local ~/.cache ~/.gconf ~/.gnome2

The clipboard is only shared if you are running a VNC client that supports this (TigerVNC). The program that handles this on the remote end is called vncconfig. It is automatically started in -nowin mode. To change the options you will have to kill it and then restart it in none -nowin mode

killall vncconfig
vncconfig

Web Browser (noVNC)

noVNC is a HTML5 based VNC client that runs inside a web browser. It enables connecting to any sharcnet visualization workstation remotely from any modern browser (one that supports HTML5). To do so simply goto the sharcnet systems page, then scroll down to the Visualization Systems table, next locate the machine you want to connect with such as vdi-centos6 and lastly click the BLUE terminal icon beside it. The remote desktop login screen should appear in your browser. If however the chosen viz machine is under heavy load, you may receive a timeout message instead of connecting successfully and should consider trying later or connecting to a different machine. It maybe necessary to try 3x before a successful connection is established. The local VNC client approach does not have this issue.

WARNING! It is not possible to copy/paste text between your workstation desktop and a web browser noVNC session. A workaround is to copy/paste the text into a file located on a global shared filesystem such as home of the noVNC session - then from your workstation desktop connect to a sharcnet system and copy/paste from the remote file to your desktop. A better solution is instead of using no VNC connect instead using a local VNC client as described below where copy/paste actions to the desktop are natively supported.

Local Client (VNC)

The local client provides a slightly faster solution that may integrate better with your system (e.g., pass through certain keystrokes that would otherwise be captured by your browser and do full screen mode better). While any vencrypt enabled VNC viewer should work, we have experienced difficulties with many of them and therefore recommend the following three.

Also note that connecting to the visualization stations via the local clients should be done to the <station>.user.sharcnet.ca address (e.g., viz4-uwo.user.sharcnet.ca) and not that standard <station>.sharcnet.ca address or else your client will not be able to properly verify the authenticity of the remote machine.

TigerVNC Installation

Tigervnc clients for various compute architectures can be downloaded from https://bintray.com/tigervnc/stable/tigervnc/.
To remain compatible with the systems you are connecting to. it is strongly recommended to update to the latest version periodically.

Windows and MacOS Installations

Download either the TigerVNC dmg file for MacOS or the vncviewer exe file for Windows from https://bintray.com/tigervnc/stable/tigervnc/.

Fedora Linux Installation

For Fedora, the tigervnc client is available in the default packages

sudo yum install tigervnc

In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in ~/.vnc:

rm -fr ~/.vnc
mkdir -p ~/.vnc
ln -s /etc/pki/tls/certs/ca-bundle.crt ~/.vnc/x509_ca.pem

NOTE: Removing ~/.vnc resets the TigerVNC configuration and may be required for this to work.

Ubuntu and Debian Linux Installations

For newer Ubuntu/Debian:

sudo apt-get install tigervnc-viewer

In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in ~/.vnc:

rm -fr ~/.vnc
mkdir -p ~/.vnc
ln -s /etc/ssl/certs/ca-certificates.crt ~/.vnc/x509_ca.pem

NOTE: Removing ~/.vnc resets the TigerVNC configuration and may be required for this to work.

Gentoo Linux Installation

To install TigerVNC emerge tigervnc after setting any desired USE flags:

emerge -av net-misc/tigervnc

In order to have TigerVNC validate encryption certificates used with our systems, you will need to create a symlink in ~/.vnc:

cd ~/.vnc
ln -s /etc/ssl/certs/ca-certificates.crt x509_ca.pem

Running

Once tigervnc is installed on your computer, connect to a SHARCNET viz station by simply clicking the TigerVNC Viewer application menu entry located typically under Applications->Internet. Once the Connection Details popup appears type vdi-centos6.user.sharcnet.ca in the VNC server: field. The hostname should be saved for next time but if not click the "Save As" button in the popup preferences and save it as a loadable configuration for the next time you start the viewer. If you cannot locate tigerVNC Viewer in your application menu on linux try opening a terminal and running the following command:

vncviewer vdi-centos6.user.sharcnet.ca

where vdi-centos6 could be replaced with viz10-uwo, viz11-uwo, vdi-fedora23 etc.

Re-Sizing the Display

To put the vncviewer client window into full screen mode, there are three options to try:

1) Click the maximize/minimize button in the upper right hand corner of the client
2) Press the F8 key to open a popup window and tick/untick the Full screen check box
3) If neither 2 or 3 work run the snxrandr command and specify a setting such as 1280x800

gvncviewer (older Ubuntu/Debian)

Older Ubuntu and Debian do not package tigervnc by default, so we instead recommend installing the gvncviewer application

apt-get install gvncviewer

The gvncviewer program will not prompt you for connecting to machines it cannot verify (it just quits), so it is necessary to provide it with a link to the system certificates

mkdir -p ~/.pki/CA
ln -s /etc/ssl/certs/ca-certificates.crt ~/.pki/CA/cacert.pem

Connecting to a viz stations is then done by running

gvncviewer <station>.user.sharcnet.ca

where <station> is substituted with the appropriate viz station name.

Clusters

Some software on SHARCNET system requires you to establish a graphical connection, so you can interact with it through a graphical user interface (GUI).

If such a graphical connection is not enabled, the program which requires it (in this example DDT), will generate an error message:

[ppomorsk@orc-login2:~] module load ddt
[ppomorsk@orc-login2:~] ddt
ddt: cannot connect to X server
[ppomorsk@orc-login2:~]

Resolving this issue requires that a graphical connection is set up. There is a number of ways to do this.

SSH (Linux and Mac)

Add the -X (or for a very few applications the less secure -Y) flag to your ssh command to enable X11 forwarding (from the cluster to your computer)

ssh -X <user>@<cluster>

For MacOS you will also need to install the XQuartz X11 server to display the forwarded the graphics from the cluster. Further information to enable forwarding is explained here.

MobaXterm (Windows)

MobaXterm is a combined ssh, sftp, and built-in X11 server from Windows. It is available as a free download from mobaxterm.mobatek.net. A convenient tutorial on its use is given on that page. To enable a graphical connection, make sure the box "X11-Forwarding" is checked. Please note using MobaXterm will not provide a high performance graphics connection to visualization machine, thus it is not optimal to use in cases where refresh and response rates are an issue, such as performing interactive 3d modelling or meshing operations in a remotely run gui application. Powerful visualization machines usually run vnc servers, and so we recommend using tigervnc.

Xming Software (Windows)

Xming is an X11 server that can be run on your local Windows desktop computer - it will allow you to run graphical applications from remote Unix and Linux computers such as the SHARCNET clusters, when used in combination with an SSH client. Similar to MobaXterm, be aware that Xming will not provide a high performance graphics connection to sharcnet visualization machines such as vdi-centos6 or gra-vdi, for this we recommend using tigervnc. For example when performing heavy interactive 3d meshing tasks within a remotely run gui application.

Where to get Xming

Xming is available from http://www.straightrunning.com/XmingNotes/, where a variety of versions can be downloaded. For a fee, you can download the latest version, or a slightly older, but still functional version is avaliable for free. Of the two free versions, one is the basic "Xming" server, and the second, "Xming-mesa", allows you to make use of 3D graphics if they are used by the remote application. This tutorial will work under the assumption that you have downloaded the free version, labeled "Xming-mesa", since it will do all of the work that the basic Xming program does, and in situations where a program requires 3D graphics support, it is better to have it already, rather than finding out when your program will not run.

How to Install and Use Xming

To install Xming, first download the Xming-mesa public domain from The Website, and run it. For the majority of the setup options, you should accept the default, and just click "Next >". When asked to Select Components, make sure "Normal PuTTY Link SSH client" is selected, and turn on all checkboxes, as below:

Xming-0.png

Once this has been completed, you can click "Next" until you reach the "Setup" window, and turn on the desktop icons for Xming and XLaunch if you wish. After this, click "Next" until done, and click the final "Install" button to complete the installation.

The first time you install Xming, you may also be asked for additional configuration options for the server. In each of these conditions, the default setting is the best choice for using Xming with the SHARCNET clusters.

Right after installation, the Xming server will already be running, but if you log out or reboot your computer, you will need to click the "Xming" icon to start it up again if you wish to use it. If you chose not to install the desktop icon, the server can also be found in the Programs menu under "Xming". To verify that Xming is installed, check the taskbar of your computer to see if the "X" logo is present, like this:

Xming-3.png

PuTTY SSH client

Next, if you do not already have a copy of the PuTTY SSH client, you can get one from here - download the putty.exe program file, and place it on your desktop for easy access, no installation is needed for this program. Once it is downloaded, run it, and you will be presented with the configuration screen. For this example, we will connect to the system rainbow.sharcnet.ca, but the same instructions can be used for any of the clusters, simply by changing the Host Name you use.

In the first configuration screen, we need to do a few things. We enter our Host Name (rainbow.sharcnet.ca) and a name for our session (Rainbow X11) and then click "Save" - we should then see what is shown below:

Xming-4-PuTTY.png

Next, click "X11" in the category menu on the left. (It should be near the bottom) and turn on the checkbox beside "Enable X11 forwarding", like this:

Xming-5-PuTTY.png

Last, return to the "Session" category at the very top of the menu on the left, and click the "Save" button again to save the X11 settings. Now the setup is complete, and you can click "Open" to log in. The next time you start PuTTY, all of the settings should be in place already if you double click the "Rainbow X11" entry in the Saved Sessions list. You can now log into the cluster using your regular SHARCNET username and password.

Now that everything is installed, the next time you come to your computer to use X11 programs on SHARCNET, you will only need to follow three steps:

  1. Start Xming (if the Xming logo is not in the tool tray, double click the Xming icon to start it.)
  2. Start PuTTY
  3. Double-click the session you wish to log into in PuTTY and log in with your username and password.

Once you are logged into the cluster, if you wish to test to verify that X11 is working, type the command "xlogo" and hit enter. A small window that looks like this should appear somewhere on your screen:

XLogo.png

You can now run any program that requires X11 to function while on the clusters.