VNC: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<h2>How to use VNC</h2> | <h2>How to use VNC</h2> | ||
<p> </p> | <p> </p> | ||
= To establish a VNC connection through the CERN firewall = | |||
== Start Xvnc server == | |||
<p>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:</p> | <p>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:</p> | ||
<ul> | <ul> | ||
Line 14: | Line 16: | ||
<li>to completely kill vnc, kill the local vnc client and kill Xvnc on the remote machine at CERN.<br /></li> | <li>to completely kill vnc, kill the local vnc client and kill Xvnc on the remote machine at CERN.<br /></li> | ||
</ul> | </ul> | ||
== Start VNC client on MacOS == | |||
<ul> | <ul> | ||
<li>on local Mac, start the "chicken of vnc" application (UPDATE: use "chicken" app from http://sourceforge.net/projects/chicken/files)</li> | <li>on local Mac, start the "chicken of vnc" application (UPDATE: use "chicken" app from http://sourceforge.net/projects/chicken/files)</li> |
Revision as of 14:53, 9 October 2014
How to use VNC
To establish a VNC connection through the CERN firewall
Start Xvnc server
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 5500" <--- use whatever port number
- ssh lxplus, on lxplus, ssh alphadaq
- on alphadaq, reset the vnc password: "/bin/rm .vnc/passwd
- on alphadaq, run "vncserver -geometry 1600x1000", then run "vncconfig -display localhost:1 -connect ladd00.triumf.ca:5500" <--- ladd00 and 5500 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.
Start VNC client on MacOS
- 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.
- 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.