VNC

From DaqWiki
Revision as of 12:37, 11 September 2012 by Olchansk (talk | contribs) (New page: <h2>How to use VNC</h2> <p> </p> <h3>To establish a VNC connection through the CERN firewall:</h3> <p> </p> <p>X11 applications (i.e. ROOT) are very slow when running at CERN beh...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to use VNC

 

To establish a VNC connection through the CERN firewall:

 

X11 applications (i.e. ROOT) are very slow when running at CERN behind the CERN firewall using multiple ssh tunnels (one ssh tunnel to lxplus, second ssh tunnel to the experiment computer running your ROOT application). VNC is one solution to this problem. Performance of X11 applications (i.e. ROOT) is greatly improved because they render graphics locally to the local "screen" of the local VNC server, all running at CERN. To see this "screen", you connect to it remotely using a vnc client. Because the CERN firewall prevents normal use of VNC where the vnc client connects to the server using a password, you use a "reverse" connection, where you start the vnc client on your desktop computer and ask the vnc server running at CERN to connect to it, as described below:

  • on local machine,  run "vncviewer -listen 9999" <--- use whatever port number
  • ssh lxplus, on lxplus, ssh alphavme02
  • on alphavme02, run "vncserver -geometry 1600x1000", then run "vncconfig -display localhost:1 -connect ladd00.triumf.ca:9999" <--- ladd00 and 9999 are the host name and port number where we started vncviewer.
  • vncviewer should see the connection request and open a new graphics window with the VNC screen.
  • to close the connection, kill the local vnc client.
  • reconnect to the vnc server still running at CERN by restarting the vnc client (locally) and reissuing the "vncconfig -connect" command (on the remote machine at CERN).
  • to completely kill vnc, kill the local vnc client and kill Xvnc on the remote machine at CERN.

 

On MacOS, do this:

  • on local Mac, start the "chicken of vnc" application (UPDATE: use "chicken" app from http://sourceforge.net/projects/chicken/files)
  • under "Connection" menu, select "Listen for server", say "Start", note the port number (5500), you will use this instead of 9999 in the vncconfig example above.
  • find the Mac IP address (i.e. if on the Shaw network): start "preferences -> network", remember the IP address, you will use it instead of the client hostname in the vncconfig example above.
  • login to the target machine, start the vncserver as described above
  • tell vncserver to connect to the Mac using vncconfig as described above, in the "-connect hostname:port" incantation, use the IP address and port number you remembered above.

To connect from home using an ssh tunnel, do this:

NOTE: this will only work for local vnc connections. For remote vnc connections (Xvnc not running on the ssh gateway host), the sshd option "GatewayPorts yes" has to be set. This is disabled by default.

  • on home computer start the vnc viewer in the "listen for server" mode, as above. Take note of the port number (5500 in my case)
  • on home computer, run "ssh -R localhost:5500:localhost:5500 ladd00.triumf.ca", where 5500 is the vnc viewer port, ladd00 is the computer where we will run the vnc server. This establishes a reverse ssh tunnel (from ladd00 to home computer). Stay in this ssh window.
  • in the ssh connection to ladd00, run "vncserver", take note of the VNC display number (ladd00:5, in my case), then run "vncconfig -display localhost:5 -connect localhost:5500", where ":5" is the VNC display number, and "5500" is the vnc viewer port number.
  • a VNC viewer window should open connected to the vnc server on ladd00.

 

K.O.