#

Using NX/NoMachine remote desktop for graphical applications

WARNING: NX is deprecated on CentOS7 and we are working on a replacement system.  Until that time the NX servers will remain available but they will be running CentOS6.  This can create compatibility problems with the CentOS7 compute nodes.  See below for details. 

PREFACE: Do not run your jobs or heavy applications such as MATLAB or Mathematica on the NX server itself. Please use an interactive session or job for all applications and scripts beyond basic terminals, editors, etc. The NX servers are a shared resource. This will also help you avoid CentOS6/CentOS 7 incompatibilities. 

Many graphical applications will run fine with the X11 forwarding steps described above, especially if you are connected to the campus network. However, X11 is a very old protocol designed for local physical networks and so can become very slow when wireless signal is poor or when accessed from home. Also, when you disconnect from the network, there is no way to "suspend" your graphical session for later use.

The rcnx01.rc.fas.harvard.edu and holynx01.rc.fas.harvard.edu servers host remote desktops served by the NoMachine NX system. Like Windows RDP and VNC, NX allows you to connect to a desktop that is running on a remote server. The network performance makes graphical applications much more responsive. And because it is running on a server, you can disconnect from the desktop (suspend) and reconnect later.

NX and CentOS7

The version of NX we run is not available on CentOS7.  We are working on a replacement for NX that will work with CentOS7.  Until that time our NX servers will remain available on CentOS6.  Sadly there are some problems with CentOS6 hosts submitting jobs to the CentOS7 cluster.  Thus for those using NX the following workflow is recommended to solve these problems.  After you establish your NX session start an interactive session on the test partition.  Once you are in the interactive session run source centos7-modules.sh, that will enable the CentOS7 specific modules and rectify your run environment.  Once that is complete you can submit jobs as per normal. 

Alternately, you can ssh -CY login.rc.fas.harvard.edu which will have largely the same effect, but may be slightly slower than an interactive session.

Users should not submit jobs directly from the NX nodes to Slurm as Slurm will map the current CentOS6 enviroment into the job they submit, this can create problems for the job.  Instead jobs should always be submitted from interactive sessions.

NX connection and usage

Please do not download client from the NoMachine website. The new version of the client (version 6) available from the NoMachine download page will not work correctly with the Odyssey NX servers. You will need version 5.3.x to connect (we recommend disabling updates in the preferences). If your client has been updated to version 6, you can download the previous version from our Downloads site.

Please remember that you must be on our VPN to connect to the NX servers.

LINUX USERS: We recommend you install Remmina and remmiina-plugin-nx on your Linux laptop/desktop. You can then connect to one of the NX servers with no further configuration. Just start Remmina, select NX as the protocol, enter the full name of an NX server in the quick connect box, and click Connect. 

MAC/WINDOWS: You will need to install a NoMachine/NX client and set it up using the instructions below. The NoMachine Client software can be downloaded from our Downloads site (login with RC username and password). Unzip the downloaded file and you will find a DMG (Mac) or EXE (Windows) installer. 

nx-client-download

These screen shots show NX on a Mac. PC software is very similar and the same choices should be made.

  1. Make sure you are connected to the RC VPN (vpn.rc.fas.harvard.edu)
    The rcnx01 and holynx01 servers are not accessible from outside of the RC VPN. In particular, you cannot access them from the FAS VPN (vpn.fas.harvard.edu). If you are unsure how to connect to our VPN, see VPN Setup
    REMINDER: When connecting to our VPN you will need to supply your username@realm (example: johnsmith@odyssey - @odyssey is the default realm for most users) as well as your OpenAuth (not Harvard Key) 2 factor token. For everything else, you will just use your username.
  2. Add a New Connection
    After starting the NoMachine client software, you should begin in the new connection wizard. Setup the connection by first clicking on the "Click here to create a connection" link or the "New" button. The example images below use holynx01.rc.fas.harvard.edu, but both rcnx01.rc.fas.harvard.edu and holynx01.rc.fas.harvard.edu are available for use.

    nx-create-connection

  3. Select the SSH protocol
    The SSH protocol should be chosen, not NX.

    nx-new-connection-ssh-protocol

  4. Specify the hostname
    This should be rcnx01.rc.fas.harvard.edu or holynx01.rc.fas.harvard.edu. If you have never connected to either machine before, you may be prompted to verify the authenticity of the server.

    nx-new-connection-hostname

  5. Use the NoMachine login
    When prompted, select the "Use the NoMachine login" rather that the system login.

    nx-new-connection-nomachine-login

  6. Don't use a proxy
    No proxy is needed to access the NX head nodes when connected via RC VPN.

    nx-new-connection-dont-use-a-proxy

  7. Give the connection a name
    This name will be used to identify the connection on your NX dashboard.

    nx-new-connection-connection-name

  8. Select your new connection
    Once the connection is setup, you can choose it from the dashboard to start a new session.

    nx-select-connection

  9. Login using your RC credentials
    After selecting your connection, you will be prompted for login credentials. This should be your RC login; no @odyssey is necessary.

    nx-connection-login

  10. Create a new desktop
    Once you've logged in, you'll have the option to create a new desktop. Only Gnome desktops are supported by the Odyssey NX login nodes.

    nx-create-new-desktop

  11. Read or skip through the connection message panels
    The NX session wizard will present you with a number of informational panels when you first setup a session. You can read these, or skip through them. Check the "Don't show this message again" boxes to avoid these in the future.

    nx-connection-messages

  12. The top left corner of your new desktop allows you to access a menu panel
    If you mouse over the top left corner of the desktop and click on the "curled" image, you'll reveal a menu panel with a number of NX options. One of the most useful is the display panel that allows you to force the desktop to change with the size of the window.

    nx-top-left-corner
    nx-menu-panel
    nx-fit-to-window

  13. Use an interactive session
    When you've connected to holynx01 or rcnx01, you should treat them like any other login node. Software should not be run directly on NX login nodes. Use srun as described in the interactive session section of the Running Jobs page to setup an interactive session. For graphical work, don't forget the --x11=first option.

  14. When closing an NX session, choose Suspend or Terminate
    When you close your NX window, you will be prompted to "Suspend" or "Terminate" the session. If you "Suspend" the session, you will be able to access it again later, whereas "Terminate" does pretty much what you'd think.


    nx-connect-to-suspended-session

CC BY-NC-SA 4.0 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at Attribution.