Get Rewarded! We will reward you with up to €50 credit on your account for every tutorial that you write and we publish!

Install and Configure Remote Desktop Access with NoMachine on Ubuntu Server

profile picture
Author
Mohammad-Reza Malekpour
Published
2022-09-19
Time to read
4 minutes reading time

About the author- M.D. and Data Scientist

Introduction

NoMachine is a free proprietary software for remote desktop access and file transfer. NX technology enables NoMachine to offer extra features and significantly better performance than other remote desktop tools, such as Xrdp and VNC. Moreover, it is truly cross-platform and seamlessly runs on Windows, Mac, Linux, Android, and even iOS devices. Thus, you can access your Hetzner server whenever you want, wherever you are!

This tutorial describes the step-by-step process of installing Xfce, a lightweight desktop environment, along with installation and configuration of NoMachine.

Prerequisites

  1. An Ubuntu server
  2. SSH access with sudo privilege

Step 1 - Xfce Installation

As usual, first let's update the list of available packages of aptitude:

sudo apt update

Be aware that installation of Xfce is so easy that it sometimes hurts 😉:

sudo apt install xfce4

Display Manager

Depending on the version of your Ubuntu, while installing xfce, it might ask for the default display manager. Feel free to select the default display manager and select OK.

Step 2 - NoMachine Installation

To install NoMachine, you need to download the .deb package from its official website. Considering the modern infrastructure of Hetzner Cloud, you probably need to download the amd64 architecture. If you're not sure, you can use dpkg --print-architecture to get your architecture.

At the time of writing this tutorial, the latest version (8.8) of NoMachine can be downloaded with the following command:

wget https://download.nomachine.com/download/8.8/Linux/nomachine_8.8.1_1_amd64.deb

Then, install the .deb package:

sudo dpkg -i nomachine_8.8.1_1_amd64.deb

Step 3 - NoMachine Configuration

If you've installed Xfce as explained in this tutorial, there is no need to change the default configuration of NoMachine at /usr/NX/etc/node.cfg.

However, you might have installed another desktop environment. In that case, head over to /usr/NX/etc/node.cfg and change the value of DefaultDesktopCommand according to your desktop environment as below:

  • GNOME - DefaultDesktopCommand /usr/bin/gnome-session

  • KDE Plasma - DefaultDesktopCommand /usr/bin/startplasma-x11

  • LXDE - DefaultDesktopCommand /usr/bin/startlxde

  • Xfce - DefaultDesktopCommand /usr/bin/startxfce4

Then, restart NoMachine:

sudo /etc/NX/nxserver --restart

Note: If you have an active firewall on your server, allow connection to port 4000 as below:

sudo ufw allow 4000

Step 4 - Client Connection

Finally, check out the NoMachine download page, and install the NoMachine client based on your local device that will connect to the server. Run the NoMachine client in the local device, click the Add button, fill the host with your server's public IP address, and leave other parameters as default.

Add Connection

Next, click the Connect button and enter your Ubuntu username (e.g., root as default) and password. If you've not set the password yet, you can simply do it interactively with passwd command.

Enjoy!

Conclusion

This tutorial provided instructions on how to install Xfce desktop and NoMachine on Ubuntu servers for remote desktop access, along with step-by-step configuration of NoMachine.

License: MIT
Want to contribute?

Get Rewarded: Get up to €50 in credit! Be a part of the community and contribute. Do it for the money. Do it for the bragging rights. And do it to teach others!

Report Issue

Discover our

Dedicated Servers

Configure your dream server. Top performance with an excellent connection at an unbeatable price!

Want to contribute?

Get Rewarded: Get up to €50 credit on your account for every tutorial you write and we publish!

Find out more