Using NoMachine NX for a remote desktop on Ubuntu 20.04 from MacOS

I recently set up an Ubuntu computer at home in a different part of the house which acts as a display for various information. Working on the desktop of this computer was difficult as I needed a wireless keyboard and mouse to connect, and my only option for a workspace was sitting on a stool at a counter top in the kitchen turning 90 degrees to see the screen. Not an ideal situation at all.

I actually had a number of issues trying to set up TightVNC and other more classical tools for setting up a remote desktop. I could obviously ssh into the computer, but as a display, I wanted to be able to also work on the desktop configuration.

I actually found setting up NX to be a lot easier than I have found setting up xrdp and vnc based systems in the past. I definitely give it one of my highest ratings of it just works, a title that sounds boring, but is a hallmark of fantastic software. Anyhow, lets get on with it.

Firstly, install NoMachine on Ubuntu. This can be done via wget or cUrl depending on your preference and what you have installed. You’ll need to get the current version on NX from their download page at https://www.nomachine.com/download/download&id=2 (it is currently 6.9.2_1) and then download it via the following, replacing the major, minor and patch version as required:

wget https://download.nomachine.com/download/6.9/Linux/nomachine_6.9.2_1_amd64.deb

Then it is simply a case of installing the deb package via following. Again, change the command to the required version as needed:

sudo apt install ./nomachine_6.9.2_1_amd64.deb

Once it is installed, check to see that it is running via systemctl.

systemctl status nxserver.service

This should output something like the following showing the service is active.

● nxserver.service - NoMachine Server daemon
     Loaded: loaded (/lib/systemd/system/nxserver.service; enabled; vendor preset: enabled)
     Active: active (running) since Thur 2020-08-06 12:29:43 PDT; 16min ago
   Main PID: 38672 (nxserver.bin)
      Tasks: 12 (limit: 4562)
     Memory: 77.7M
     CGroup: /system.slice/nxserver.service
             ├─38672 /usr/NX/bin/nxserver.bin --daemon
             └─38838 /usr/NX/bin/nxd

Aug 06 12:29:43 dashboard systemd[1]: Started NoMachine Server daemon.
Aug 06 12:29:47 dashboard nxexec[38837]: pam_unix(nx:session): session opened for user ianbelcher by (uid=129)
Aug 06 12:29:48 dashboard nxexec[38888]: pam_unix(nx:session): session opened for user ianbelcher by (uid=129)
Aug 06 12:29:48 dashboard nxexec[38889]: pam_unix(nx:session): session opened for user ianbelcher by (uid=129)
Aug 06 12:29:49 dashboard nxexec[38891]: pam_unix(nx:session): session opened for user ianbelcher by (uid=129)

The next step is to install the NoMachine client on MacOS. This can be done easily by visiting the NoMachine homepage and clicking the Download now button. Once it has finished downloading the dmg file, install it as you would any other downloaded application. In this instance, there is a pkg installer in the dmg, which will also ask you to enable certain privacy and accessibility permissions.

When starting the NX client, it will do a scan of your local network and see if it can find any hosts. In my case it picked up the Ubuntu computer that I wanted to connect to automatically, but otherwise, visiting the target ip with the nx protocol, such as nx://<HOST_IP> in your browser should also give you the option to open a connection in the NX app.

There are a large number of features within NX, but the default settings will give you a very pleasant remote experience when working on a local network without any worries or headaches trying to configure the connection.

I do have to say, I did have a few issues running in full screen mode, but my main monitor is 4k so this isn’t an uncommon occurrence when doing tasks such as remote desktop or other streamed and interactive activities.

Over all, NX is amazing, it’s worth putting in the time to get set up if you need to do a bit of work in a remote desktop fashion.

Posted in: