How to connect remotely to any ECMWF Linux-based workstation

Step-by-step guide

This instructions cover ONLY the connections from a ECMWF desktop or laptop connected to the LAN or the VPN.

If you're outside the LAN and can't use the VPN client (for instance, because you're using a personally owned device), then follow these instructions instead: Remote access Suse 13.1 linux desktops

  1. If accessing from outside the LAN (for instance using one of the Centre's laptops, setup a VPN connection using your user id and activid token
  2. Open the NoMachine client
  3. If this is the first time, create a new connection to your workstation. For instance, if the workstation is named "foo":
    1. Name: "Connection to foo"
    2. Protocol: NX
    3. Host: foo.ecmwf.int
    4. Port: 3389
    5. Click "OK" to save the connection
  4. Double-click on the connection icon
  5. If prompted to accept and save the host key, say yes
  6. Use your regular login and password
  7. Follow the instructions
  8. When finished, just close the window

 

IMPORTANT

  • You will be accessing the desktop layout currently running in your physical desktop, so:
    • For a more comfortable user experience, the native resolution of the NX client should match as better as possible with the resolution of the workstation being accessed to
    • Everything that was left running (documents, folders, browser windows, etc) will be shown in the NX session
    • When the NX session is closed, everything that was left running (documents, folders, browser windows, etc) will be shown in the physical desktop or further NX sessions
  • Due to security reasons, when you access your desktop remotely, the physical screen of your desktop will be turned off
  • So, if the remote session is not closed in the remote end, the physical screen of the desktop will remain black. To work around this, before a reset of the workstation, which will get the output back but might result in loss of unsaved work, the following steps can be tried as a recommended approach:
    • Start another NX session, for instance from any other workstation of the ECMWF
    • This session will take the ownership of the screen
    • The previously running session should be terminated automatically as soon as the display is shown in the new one
    • Close the newly resumed session
    • The screen output should be sent back to the physical screen
  • A quickest way to bring the display back to the local monitor would be:
    • Open a SSH session from a different workstation to the affected one, using the same user account that was used to stablish the NX connection
    • Copy the following command and paste it into the console: pkill -f "nxnode.bin -H"
    • Please be aware that, although this method has been tested and will produce the expected result flawlessly most of the times, in some particular scenarios the aforementioned command might result in a reset of the running session and should be used only as the last resource before a reset of the workstation if the first method explained above can't be used for some reason and / or an eventual log-off wouldn't matter to the user
  • If the Linux workstation has two monitors attached, the screen layout may appear incorrectly after disconnecting an NX session. To fix this:
    • Click in the KDE start button
    • Type "display" in the search box
    • Select "display configuration"
    • Drag the secondary monitor and drop it back in its intended position
    • Click "apply"

3 Comments

  1. I had problems attaching to the session with nx this morning. Login succeded but I received the message "No available sessions on this server". I tried above suggested pkill -f "nxnode.bin -H" but did not have any luck. However, I noticed that nxnode  wasn't running with the "-H" flag, so I tried pkill nxnode.bin  instead. Afterwards I was able to log in successfully again and my session was still running. Maybe something changed in the way NX spawns this process and above instructions need updating?

    1. Hi Balthasar,

      This is answered elsewhere (see Remote connection via VDI to Linux) but I'll repeat the solution here for completeness.

      What you need to do is to log on to your desktop with a non-graphical session (for example, ssh to your desktop from MobaXterm) and then run:

      sudo /usr/bin/systemctl restart nxserver.service

      This will restart the NX service and your connection should work again

      If you can't remember the command in future then you can use "sudo -l" to get a list of all the sudo commands you can use - you should then see this one listed.