Project

General

Profile

Running VNC on Minos Gateways

NB: to run Minos rcGUI offsite, you MUST use VNC!!

Running rcGui RunControl or OM OnlineMonitoring remotely over an X11 connection can often be painfully slow, and may not even work, depending on your connection speeds Using a VNC client allows on your local host connected to a fully functioning login session on any of the gateway nodes via a VNC server, results in greatly increased response time.

Go to http://realvnc.com and download the free VNC Viewer for Linux, Windows, or Mac. You do not need the encrypted version of the viewer, since your ssh tunnel will provide that protection. There are many other VNC clients available for these platforms; if you use another, the VNC client instructions will be similar. VNC Viewer has a nice feature that allows you to switch between full screen and windowed versions of the client, so you can switch to another window or desktop.

To set up a FD session, you must use an encrypted ssh tunnel to gain access to the gateway, e.g., from your local machine:

kinit username@FNAL.GOV
ssh -L 5904:localhost:5904 minos@minos-gateway-fd.fnal.gov
vncserver -geometry 1800x1000 :4 -localhost

Note that the ":4" must correspond to the "4" in the port number 5904. Please use your own offset from 5900 to avoid clobbering others' sessions. The 1900x1024 is the initial size of the window, and you may resize to make it smaller if necessary. Do not forget the -localhost switch at the end of the command, this is required by Fermilab security.

Now go back to your local machine prompt and launch VNC Viewer either via your GUI or in a terminal as below (this is specific to RealVNC):

vncviewer localhost:4

Note again the ":4" must match the port number offset again and you will have to supply the password for the "minos" account. Also, note that the vncserver instance will persist even if you close the window or lose network connectivity. During such a break, all your windows, including rcGui will remain active in the background. Simply reconnect to resume the session.

To set up a ND session from your local machine is identical but for substituting "nd" for "fd"::

kinit username@FNAL.GOV
ssh -L 5904:localhost:5904 minos@minos-gateway-nd.fnal.gov
vncserver -geometry 1900x1024 :4 -localhost

Note that the ":4" must correspond to the "4" in the server port number 5904. Please use your own offset from 5900 to avoid clobbering others' sessions. The 1900x1024 is the initial size of the window, and you may resize to make it smaller if necessary. Do not forget the -localhost switch at the end of the command, this is required by Fermilab security.

Now go back to your local machine prompt and launch the viewer (this is specific to RealVNC):

vncviewer localhost:4

Note that the ":4" must correspond to the "4" in the client port number 5904. We must use these higher port numbers in the ND since those are the only ports that are opened by computer security.

vncserver has some other commands that can be useful with one caveat. First is vncserver -list which should list all running ports on the server-side computer. If your port is already running, then you should not run the "vncserver -gieometry 1900x1024 :port -localhost" again. However, if VNC server processes are killed other then the command discussed next, this list does not reflect the process disappearing. A safer method is to use ps aux | grep vnc and look for the Xvnc process command(s) which will include the port number(s). Second, the vncserver -kill :port command will kill just the process for a given port, and properly remove that port from the vncserver -list list.

Personal Port Numbers

To make sure port numbers do not clash, here are some assignments for the most likely culprits:

Jerry Meier 5901
Nuruzzaman 5901
Dave Saranan/ Denise Oserholm 5902
Donatella Torretta 5903
Alec Habig 5904
Arthur Kreymer 5905
minos 5906
William Badgett 5907
Steve Hahn 5908
Navaneeth P 5909
Xinjie Qiu 5910
Cesar Castromonte 5911