How to install NoMachine on your Webdock server and connect with the NoMachine client

Last updated: February 2nd 2022

Introduction

NoMachine is a proprietary software application for remote access, desktop sharing, virtual desktop, and file transfer between computers. It is developed by the Luxembourg-based company NoMachine. It offers better performance and additional features compared to other remote desktop tools.

Prerequisites

  • A running Webdock Ubuntu cloud instance.

Installing NoMachine

The NoMachine server has to be downloaded from the official website as NoMachine cannot be installed from Ubuntu’s APT repo.

To download the NoMachine deb file first SSH into your server and fetch the file.

$ wget https://download.nomachine.com/download/7.7/Linux/nomachine_7.7.4_1_amd64.deb

Note: At the time of writing latest version of NoMachine is 7.7. Please visit the official website for the latest version.

To install the downloaded deb file run the following command:

$ sudo dpkg --install nomachine*.deb

Wait for a few seconds for the installation to complete.

Configuring NoMachine

Depending upon the desktop environment you installed (from one of our guides), you need to change the Default Desktop Command of NoMachine.

Open the node.cfg file found in /usr/NX/etc/node.cfg and change value of DefaultDesktopCommand to an appropriate value based on the desktop environment you installed.

$ sudo nano /usr/NX/etc/node.cfg

For Gnome:

DefaultDesktopCommand "/usr/bin/gnome-session"

For Ubuntu Mate:

DefaultDesktopCommand "/usr/bin/mate-session"

For Cinnamon:

DefaultDesktopCommand "/usr/bin/cinnamon"

For KDE Plasma:

DefaultDesktopCommand "/usr/bin/startplasma-x11"

For LXDE:

DefaultDesktopCommand "/usr/bin/startlxde"

For Xfce4:

DefaultDesktopCommand "/usr/bin/startxfce4"

Once you have made the changes restart NoMachine using:

$ sudo /etc/NX/nxserver --restart

Configure firewall

By default, on our LAMP/LEMP stacks, UFW is enabled by default. To access your remote desktop you need to add allow rules to your firewall. However, on our clean OS installs, UFW is disabled by default. Please run the below command if you have the firewall activated on your server. Execute the following command to allow communication over port 4000.

$ sudo ufw allow 4000

Installing NoMachine on your PC

Head over to nomachine.com and download and install the NoMachine client on your local machine.

Open it and click on Add. Enter a name, your Webdock alias/IP address as the host. Leave the port and protocol to its default value.

Click on connect and enter your shell user credentials to access your remote desktop.

In some cases, your remote desktop comes in low resolution. To change resolution, hover your mouse to the top-right corner. You will get an opening page animation. Click on it → Go to Display → Resize remote display. That should resize the remote desktop resolution.

Conclusion

In this article, we showed how to install and configure NoMachine on your Webdock server to access your remote desktop.

 

We use cookies. Please see our Privacy Policy.