Knowledge Base
Searching in : Article
ID: AR03P00973
Applies to: NoMachine Software
Added on: 2018-03-14
Last Update: 2025-03-17

Connecting to Linux headless machines with NoMachine

NoMachine is designed to work out-of-the-box on Linux headless machines provided a desktop environment is installed. NoMachine is able to detect when the X server is not running and run its own virtual display, which is an embedded X server. This ability, enabled by default in the free edition of NoMachine, can be activated also in the commercial versions (see instructions for the Enterprise Desktop at the end of this article).
 

What to do if you see a black or white screen or the screen is frozen

A specific case which leads to various symptoms (e.g. black screen or white screen or frozen screen) on Linux is when the X server is running but it is not rendering because the video card is turned off. In this case NoMachine doesn't use its own virtual display because it detects that the X server running.

Possible solutions are:

1) Use a X virtual framebuffer

Stop the X server manually, in order to make NoMachine use its own display service:

Use the proper command to stop the X server according to your display manager, for example:

sudo systemctl stop lightdm

or: sudo systemctl stop gdm

or: sudo systemctl stop sddm etc ...

or, if you don't know what it is, use the "display-manager" alias:

sudo systemctl stop display-manager

and restart the NoMachine server:

sudo /etc/NX/nxserver --restart

At this point NoMachine will create its own virtual framebuffer and you should be able to connect and see the desktop.

Note If the Linux system doesn't have systemd (e.g. RHEL 6 and earlier versions), reboot the machine at runlevel 3:

sudo init 3

2) Use a fake display dongle

A common solution, valid for all the supported Operating Systems, is to adopt a fake display dongle (also called 'dummy dongle') inserted in the video card port to simulate the presence of a screen and force the system to take full advantage of the GPU as if a real monitor is connected. In case of a Linux host it's necessary to reboot the machine or restart the display manager to make this operative.


3)  X.org users can set up Xorg to work in headless mode

3.1) For NVIDIA GPUs and proprietary driver only, another possibility is to configure X.org to run headless (use --allow-empty-initial-configuration)

Ref. https://virtualgl.org/Documentation/HeadlessNV


3.2) Install a Xorg dummy driver by creating fake EDID (Extended Display Identification Data) and use it in Xorg.conf (EDID are stored in the monitor and read out by the GPU when monitor is connected)

 


For the Enterprise Desktop: how to enable the creation of NoMachine display service 

1) Edit /usr/NX/etc/server.cfg and enable the following keys (remove the prepending #):

CreateDisplay 1

and set this key:

DisplayOwner USERNAME

to instruct the Enterprise Desktop to create a virtual display for the user specified in DisplayOwner. All other users will connect to the desktop of such DisplayOwner.

2) Connect to the Enterprise Desktop: NoMachine will create its own virtual framebuffer and the user should be able to specify a custom resolution in 'Display settings'.

 


Other references

Solving black screen problem on Windows headless machines https://knowledgebase.nomachine.com/AR05S01124

Solving slowness problems on headless machines https://knowledgebase.nomachine.com/AR05S01125

Solving bad render problems on headless machines https://knowledgebase.nomachine.com/AR05S01126

Solving 'stuck resolution' problems on headless machines https://knowledgebase.nomachine.com/AR05S01127