Overview

When users are off-site or have slow internet connections, displaying graphics can be cumbersome.  PCDS has explored two solutions for this problem:

  1. The first ("NX technology") gives the user a special remote desktop that is specifically designed to improve the performance of X11 graphics over slow connection speeds (compared to ssh).  
  2. The second ("Virtual Box") allows the user to directly install the psana analysis environment on their Windows, Linux or Mac machine, so that LCLS data analysis (including graphics) can be done with no network connection (click here for information on the virtual box approach).

This page is about the usage of NoMachine for providing NX technology to users involved in LCLS experiments or operations.

NX Technology/NoMachine NX is supported on Windows, MAC and Linux computers. 

Minimum System Requirements

A single 4k (3840 x 2160) display requires ~20 Mbps of download speed to support a 1Hz refresh rate.  This may vary depending on the number of high-definition or rapidly changing UI elements being displayed.  The upload requirements are minimal for control, but may limit speed of file transfers from the client to the host.

Note: MAC Clients must install XCode and XQuartz.You can download XQuartz from https://www.xquartz.org

Installation

You can download the latest version of the enterprise client from https://www.nomachine.com/download-enterprise#NoMachine-Enterprise-Client. Ubuntu/Mint users should download the Debian version of the NoMachine client.

Configuration

LCLS is currently using the shared resources in S3DF described in more detail here. A very brief summary is that the host is set to s3dfnx.slac.stanford.edu, port to 22, and protocol to SSH.

Middle mouse button emulation for Mac users

MacOs users may wish to have middle mouse button functionality enabled in their NoMachine sessions. 

Here are the required settings within the XQuartz Preferences section (access via XQuartz→Preferences):

Use in EPICS EDM Displays

One of the common uses of this feature is to display the EPICS process variable (PV) names associated with widgets on EDM-based operator screens. Once these preferences are set then Option-Click displays the PV name upon release of the click (it is not displayed when still depressed) - and puts it into the cut-and-paste buffer.


Troubleshooting

bashrc

Avoid sourcing the psconda environment when accessing the NoMachine servers.  To add the conda environment to your profile edit $HOME/.bashrc with the following content:

  • Set an alias to source it manually:
.bashrc
 alias psconda='source /reg/g/psdm/etc/psconda.sh' 
  • Only source the environment on the ana nodes :
.bashrc
export MN=$(uname -n)
if [[ "$MN" =~ ^psana ]]; then
    source /reg/g/psdm/etc/psconda.sh
fi

Connection Issues

If you are not able to connect to NoMachine, check the followings:

  • For an offending ssh key error, please remove the old key by typing the following command: ssh-keygen -R "hostname" (e.g. ssh-keygen -R psnxserv01)

  • MAC Clients must install XCode and XQuartz.You can download XQuartz from https://www.xquartz.org. Otherwise, you will get the following error:

  • The server is setup to limit to 4 connection attempts per minute, this is to discourage brute force attempts for security purpose. If it seems to take a long time to connect after you made multiple connection attempts quickly, you can just cancel out and try to log back in after a couple of minutes.
  • If you have disconnected your session without logging out and try to reconnect, once you hit the connect button, you will see the following dialog box. You can create a new session by selecting 'Create a new desktop or custom session' or you can reconnect to your existing session. If the existing session failed to reconnect, you can right-lick on the icon representing your previous session and select Terminate session. And then click on 'Create a new desktop or custom session' and select 'Create a new virtual desktop' to click on continue.

Reconnect "Black Screen" Issues

Sometimes users will find that they are unable to reconnect to an existing session, and are shown only a blank screen.  We do not yet understand this issue, so our solution is to terminate the user's existing sessions, and kill all the user's running processes on the NoMachine server.  The easiest way for the users to deal with this is to send a note to pcds-it-l@slac.stanford.edu and we will remove all old sessions and process.

It's also possible for users to fix with this themselves by ssh'ing to psnxserv.slac.stanford.edu and killing their own process.  Potentially useful commands follow:

Show all running user processes: 
ps -f -u $USERNAME
Kill a specific process using its process ID (found in the PID column of the "ps" command output):
kill <PID>
Kill a specific process that doesn't want to die (i.e. was not killed by "kill <PID>"):
kill -9 <PID>
Kill all user owned processes running on the server, including current ssh session, shell and the pkill command itself. This is a quick way to remove the majority of user owned processes:
pkill -u $USERNAME

Note that the user will have to reconnect after running pkill and may have to try a number of times (possibly using the -9 option, as shown with the kill command).

Resuming a NoMachine Connection

If you are not able to resume a NX Connection and you typically connect from multiple computers, be sure to use similar version of NoMachine client where you initiate the connection from. To check for NoMachine version, after you have launch NoMachine client, go to Preferences on top, then click on Updates, it will show you the version that you are running NoMachine on.

Broken display with "Green Screen" Issues

If your display is broken with mainly a green screen, it could be a hardware decoding issue. Click on "Display" button on NoMachine (shown below). Then click "Change settings" and turn on "Disable client side hardware decoding".

Other issues

If Ctrl-C (Ctrl-break) does not work on the Linux client, hit the Alt-Ctrl-C (Use it in proper sequence so hold down the key one at a time). WindowsKey-Ctrl-C, or turn on Caps Lock and hit Ctrl-C will also work.

Also see our how-to guide for Diagnosing Network/Connection Problems


2 Comments

  1. Hoffmann, Matthias C.

    Is this page still up to date? It seems like psnx03 is no longer reachable

  2. Omar Quijano

    The services was moved to S3DF.  Please follow the instructions provided by the url:  https://s3df.slac.stanford.edu/#/accounts-and-access?id=how-to-connect