VNC: RealVNC

Overview

RealVNC is a Virtual Network Computing (VNC) server which provides a securely authenticated and encrypted way for users to create and view a virtual desktop that persists even if no client is actually viewing it. As an example, let's say you have a several windows open to remote systems running interactive jobs but need to go home for the evening. After dinner you want to monitor your interactive jobs or perhaps open a Totalview debugger from the compute cluster. With RealVNC, you can set those windows and jobs up in a virtual desktop that is available anywhere you have network access to the server. You can simply log into the CZ or RZ vnc cluster, re-attach to your RealVNC session, and continue where you left off, with all windows remaining the same.

RealVNC at LLNL is straightforward to use, secure, highly performant, and compatible with multiple client viewers. There are a couple caveats, however:

  • LC prohibits resource-intensive applications from running directly on the VNC server. To ensure a smooth experience for a large number of simultaneous users, users should use the RealVNC desktop only as a gateway to SSH to other systems, e.g. login nodes for SLIC or compute clusters. For this purpose, some common applications, such as Firefox or apps in /usr/tce, have been disabled. It is permitted to run GUI applications remotely from another system on the virtual desktop such as Firefox or Totalview.
  • RealVNC does not support some OpenGL programs. If you require OpenGL support, you will need to use NICE DCV. If you find that running VisIT in vncviewer is not adequate, we suggest you use the VisIT client-server interface.

Environment

  • Machines: RealVNC is only installed on dedicated VNC clusters, with one for each LC center: czvnc.llnl.gov, rzvnc.llnl.gov, and scfvnc.llnl.gov
  • Location: RealVNC is launched by connecting to port 5999 on the VNC nodes. See the Usage section below.
  • Settings: No special settings are necessary for RealVNC on the server.
  • File Systems:The VNC nodes mount the typical LC file systems, including home directories, parallel file systems, and workspaces.
  • Reduced Programming Environment: The VNC nodes are intended to provide a gateway to LC clusters and thus have a reduced development environment. Many packages found on clusters in /usr/tce, such as compilers and MPI builds, will not be made available on the VNC nodes. If there are packages that users would like LC to consider supporting on the VNC nodes, please send a request along with justification to the LC Hotline.

Usage Instructions

  1. Ensure the proper account(s). All users should have accounts available on the czvnc cluster, and RZ and SCF users should also have their accounts active in those respective centers.
  2. Open the RealVNC client (Note: You *must* use the RealVNC client to connect)
    1. On the OCF (CZ or RZ), you may install the RealVNC client from your LLNL workstation's software catalog for MacOS or Windows and via the LLNL YUM repository on Linux. Alternatively, you can download the RealVNC client and install it on your desktop. VNC clients not supplied by RealVNC will not work.
    2. On the SCF, the Windows and Linux iSRD workstations already have the RealVNC client installed. In Windows, you can find the "VNC Viewer" client in your normal application menu. In Linux, you can find the RealVNC "VNC Viewer" client by going to your desktop's application menu and looking under the "Internet" sub-menu. If you do not see it, you may need to reboot to load a newer image.
    3. Click on the VNC Viewer entry to open the client.
  3. Connect to the remote host. Exactly how to do this depends on where you are connecting from:
    1. If you are connecting to the CZ or SCF
      The hostname for the VNC server on the CZ is czvnc.llnl.gov or scfvnc.llnl.gov for the SCF. To connect to czvnc or scfvnc you simply launch your VNC viewer and connect to czvnc.llnl.gov:5999 or scfvnc.llnl.gov:5999.
      Authentication:  Use your LC username and RSA token.  Note that the default username may not be your LC username - be sure to use your LC authentication if that is the case.
      You will then be connected to a session.
      NOTE: Several users have reported graphical "glitches" on czvnc where some windows and menus in the default desktop environment suddenly appear as solid black regions when focused.  LC systems staff are working on a permanent solution, but in the mean time the following steps should correct any server-side display corruption:
      1. Press+to open a prompt for a command.
      2. Enter restart (or simply r) as the command and pressto reset the desktop and window manager without interrupting your session.
    2. If you are connecting to the RZ (Restricted Zone):
      The hostname for the VNC server on the RZ is rzvnc.llnl.gov.
      1. You may connect directly via VNC to rzvnc.llnl.gov if you are connecting from an LLNL network or an ihpc node at LANL or SNL.
        1. Launch your VNC viewer and connect to rzvnc.llnl.gov:5999.
      2. From outside LLNL or the ihpc network, you will need to set up an SSH tunnel to forward your traffic.
        1. Set up a tunnel through a server on an approved network (LLNL or LANL/SNL ihpc node). For example, from an SNL desktop, you might type:
          ssh -L 5999:rzvnc.llnl.gov:5999 ihpc
        2. Then launch your VNC viewer and connect to localhost:5999
  • Setting Screen Resolution. The default screen resolution is intentionally low in order to support lower smaller laptop screens. To optimize your experience, you can set the resolution of your virtual desktop both via a config file and dynamically on the command line. Setting the resolution in your local config file will cause all new sessions to open at that resolution, while the command line option allows you to quickly switch to one of many supported resolutions.
    1. To set the permanent resolution in your config file, create or edit your ~/.vnc/config file and add the line
      -geometry <XXXXxYYYY>

      where XXXX is the horizontal resolution and YYYY is the vertical resolution, e.g.,

      -geometry 1920x1600
    2. To view or dynamically change the screen resolution of your virtual session, use the xrandr command in your virtual desktop session.
      1. To list available resolutions, simply type the command xrandr in a terminal in your virtual desktop.
        1. Note: One of the resolution lines will have a '*' after the second column; this is your current running resolution.
      2. Use xrandr -s <XXXXxYYYY> to dynamically change your window to the desired resolution.
  • Disconnect from the VNC session - two choices. If you want your VNC session to persist so you can connect again later, simply close the VNC session window(s), and your VNC session will persist; next time you try to open a RealVNC session, it will automatically connect you to your existing session.  To completely terminate your VNC session, there are multiple options:
    1. The suggested way to terminate your session is to log out from the virtual Linux desktop inside your main VNC session window. This will differ depending on your chosen desktop, but for Gnome, click on the "power" icon in the upper right of the virtual desktop, select your name, and then click on "Log Out". This will exit the VNC server.
      • Note: If you make your own ~/.vnc/xstartup file, you may need to put this same command at the end of it, or your VNC session will not terminate properly.):
        vncserver-virtual -kill $DISPLAY
    2. Alternatively, you may run the vnckill script. This script is in /usr/local/bin on RealVNC servers and should be in your path. By default, it will prompt you to confirm termination of the session, but you may provide a -y option to avoid the prompt and to terminate your session.

Help

The VNC nodes are intended to provide a gateway to LC clusters and thus have a reduced application environment. Many packages found on clusters such as compilers and MPI builds, are not available on the VNC nodes. If there are packages that users would like LC to consider supporting on the VNC nodes, please send a request along with justification to the LC Hotline.

Additional tips and tricks for using VNC at LC can be found on the CZ Confluence at https://lc.llnl.gov/confluence/display/LC/VNC+How-to+for+LC and on the RealVNC support page. Help is also available from the lc-hotline@llnl.gov, (925) 422-4531.Al

UCRL-MI-128467-REV-1