Remote Unix Desktop

A remote Unix Desktop is used for accessing experimental and computational resources at SSRL. This is a client/server application, where the free client is installed on the user's computer and SSRL is running the server part. With the client installed, the remote user will be able to run all command line and X-Window based applications available at the macromolecular crystallography beam lines. The server end performs the bulk of the computational work and the client require minimal CPU and memory resources. Bandwidth requirments are modest, even a dialup connection is sufficient for running the data collection.

The remote desktop software is called NoMachine Terminal Server and is a product of NoMachine . By using this software, we can provide the same computing environment remotely at your desk, as you would find locally at the crystallography beamline workstation. That includes access to the data processing servers with all crystallography software and the beamline control software (Blu-Ice).

Clients for the NoMachine software are available for Linux, Windows and Mac OS X. There are also versions available for iOS and Android tablets. However, their usefulness for traditional X11 based applications may not be that great.

Note that the default product offered when you visit NoMachine's web site is the free personal server product. It is a package of both the client and a single user remote desktop server. The client will work fine with SSRL's server. If you only want the client, it is available as the "NoMachine Enterprise Client" and can be found on the Enterprise Products Evaluation download page.

Server status

We are currently running two servers for remote access;

  • smbnxs1.slac.stanford.edu
  • smbnxs2.slac.stanford.edu

Both servers are currrently running Nomachine Terminal Server version 7 and the operating system is Debian Linux version 10.

Client installation and configuration

Before accessing our remote Linux desktop server for the first time, the user must follow a simple procedure to install and configure the NoMachine client. See:

  • Client installation and configuration for NoMachine Client version 4, 5 and 6 using the NX protocol (preferred).
  • Same instructions for NoMachine Client version 4, 5 and 6 using the SSH protocol.
    Some WiFi locations, notably the Stanford Guest House, might be blocking port 4000 that the NX protocol uses.

Access to beamline computing facilities

After logging in to the NX server, the user may establish a remote internal connection to any SSRL SMB computer:

  • Click on the Blu-Ice icon in the menu bar to open the beamline control software.
  • Click on the SSRL icon to open a shell on one of the data processing computers.
  • Open a terminal window by clicking on the terminal icon, or right-click anywhere on the desktop window and select a terminal from the menu.
  • Log in to any available compuer as described in the computing environment document.

Troubleshooting

While the NX remote desktop has been working very well for both staff and users over the years, problems now and then show up. Here is a list of issues that we have come across and managed to find solutions to.

Check that you have the latest version

By far the most important advice is to keep the NX Client up to date. NoMachine normally updates the NX Client packages several times a year. These updates usually fix real bugs and adds some features. If you have trouble with the NX Client, please check that you are running the latest version.

  • The current version (Jan 2018) of the NoMachine Enterprise Client is 6.0.66
  • Note that Mac OS X with versions newer than 10.7 require at least version 4 of the NoMachine Client. See below for more details.
  • There is an alternative client available from OpenNX which is available for Windows, Mac and many Linux distribuitions. It is based on the 3.5 version of NX client and it will work on some newer Mac OSX versions.

New config files are required with NoMachine 4/5 Client

If you upgrade from version 3 to version 4 or 5 of the NoMachine Client, you can't use your old configuration files. The config files are in a folder named .nx in your home folder. Just delete or rename that folder before starting the new NoMachine client.

An error occurred while connecting to the server computer

  • Check that your network connection is active. To verify, try using a plain ssh session from a terminal;
    ssh username@smbnxs1.slac.stanford.edu
  • Check for typos in the server name: smbnxs1.slac.stanford.edu or smbnxs2.slac.stanford.edu
  • Occasionally a server may be down for maintenance and upgrades. Keep a configuration for each of our servers available. If smbnxs1 does not respond, try connecting to smbnxs2 instead, or vice-versa.

Opening a second NX client kills the first session

  • You may have configured the client with the same "Session Name" on two different computers. Accessing the same server with the same account and "Session Name" will terminate the first session. Reconfiguring your NX client and provide a different session name, for example include the hostname in the "Session Name".

The client session suddenly closes

  • Check the status of you Internet connection. Even relatively short interruptions in connectivity can cause the session to disconnect. Normally you should be able to re-connect as soon as connectivity is re-established.
  • Someone else in your group may be accessing the same server using the same session name as you. See the item above.

Fonts do not look correct or software XYZ crashes with missing font error

  • If you are using a Microsoft Windows client, install the four optional font packages that are available for Windows from NoMachine.
  • Ubuntu and Fedora does not install some of the needed legacy bitmap fonts by default.
  • On Mac OS X version 10.8 and newer, the X11 software is no longer installed as part of the OS installation. Install the latest XQuartz package to get all fonts.

Windows Vista problems.

  • The NXwin.exe process may end up using 100% cpu time or even crash and prevent the NX session from starting, the latter problem seems to be specific to 64bit Vista. The workaround is the same for both issues.
    1. Disable the use of DirectDraw for screen rendering. This setting is found under the "Advanced" tab in the configuration. See the NX installation and configuration for instructions.

Mac OS X specific problems

General issues

  • Tab completion in a shell window activates "window cycling" feature. Window cycling is normally mapped to the Alt-Tab key combination but is triggered by a simple Tab under OS X. The solution is to disable the mapping of Alt-Tab to window cycling.
    1. Right click on the desktop to get the menu
    2. Under the "Settings" sub menu, select "Window Manager Settings"
    3. Select the "Keyboard" tab and Click on the "Add" button to create a custom keyboard theme
    4. In the dialog box, give the theme a name e.g. "Mac"
    5. In the "Windows shortcuts" pane, scroll down to "Cycle windows" item and double click
    6. A dialog box comes up, select "No shortcut"
    7. Click "Close" to get out of the config, and windows cycling is now disabled.

OS X 10.8.x and newer

  • X11 Server software is no longer bundled with the OS.
    This leads to some software will crash due to missing fonts.
    Solution: install the XQuartz software package available from Apple (which most crystallographers have done already).

OS X 10.7.x and newer

  • Requires NoMachine version 4
    OS X Lion no longer provides compatibilty mode for PowerPC executables. All 3.x NX Clients for OS X are PowerPC executables and NoMachine does not plan to provide Intel executables of the NX Client.

OS X 10.6.x

  • Requires NX client version 3.4.0-8 or newer.
  • If you are upgrading the NX client from a relatively old installation (3.0.0) , there is a possibility that libraries are left over in /usr/local/lib/nx. Newer installations installs all libraries into /usr/NX/. If you installed version 3.4.0 and the error log starts with lines like those below, please remove all files in /usr/local/lib/nx.
      NXPROXY - Version 3.0.0
    
      Copyright (C) 2001, 2007 NoMachine.
      See http://www.nomachine.com/ for more information.
    
    It should read like this:
      NXPROXY - Version 3.4.0
    
      Copyright (C) 2001, 2010 NoMachine.
      See http://www.nomachine.com/ for more information.
    
  • The client stores configuration files and cache information in a directory named .nx in your home directory. It appears that it is possible that some files in this directory gets corrupted. Or perhaps it is due to version differences. If you see error messages like those below when you try to connect, the config files may be the problem. Two users have successfully solved this by removing $HOME/.nx and re-enter the client configuration.
       NXPROXY - Version 3.4.0
    
       Copyright (C) 2001, 2010 NoMachine.
       See http://www.nomachine.com/ for more information.
    
       Info: Proxy running in client mode with pid '12345'.
       Session: Starting session at 'Tue Jul 20 14:46:26 2010'.
       Error: Can't determine the location of the X display socket.
       Error: Error 2 'No such file or directory' checking '/tmp/launch-xxxxx/org.x'.
       Session: Session terminated at 'Tue Jul 20 14:46:26 2010'.
    
    
    

OS X 10.5.7 on the Intel platform

  • Several people have reported having trouble connecting after upgrading to version 10.5.7. The error occurs while establishing the connection, before the user is authenticated. An error message is displayed as "Connection Time Out", and the detailed error message looks like this;
        NX>  203 NXSSH running with pid: 849
        NX>  285 Enabling check on switch command
        NX>  285 Enabling skip of SSH config files
        NX>  285 Setting the preferred NX options
        NX>  200 Connected to address: 134.79.28.89 on port: 22
        NX>  202 Authenticating user: nx
        NX>  208 Using auth method: publickey
    
  • At least one user have reported that Starting the Mac's X11 software manually before starting the NX client solved the problem.
  • Versions 3.3.0-6 and newer no longer exhibit this problem.