NoMachine (free version) is for connecting to the physical desktop of the remote machine. To do that it's necessary that a graphical desktop environment (and consequently an X server) is available there.
When the local X server cannot be found, NoMachine is able to use its own display service (that is an embedded X server) to let users connect seamlessly a physical desktop running in background on the remote machine. Pre-requisite is having a desktop environment installed.
The following keys in the server configuration file (server.cfg) allow to manage behavior of the server when it needs to create the X11 display:
# Enable or disable the automatic creation of an X11 display when no
# X servers are running on this host (e.g. headless machine) to let
# users connect to the desktop. This setting applies to NoMachine
# servers not supporting virtual desktops and permits to have one
# single display.
# 1: Enabled. NoMachine will create automatically the new display at
# server startup. This setting has to be used in conjunction with
# 'DisplayOwner' and 'DisplayGeometry'.
# 0: Disabled. NoMachine will prompt the user for creating the new
# display. This is the default.
# When 'CreateDisplay' is enabled, specify the display owner and let
# NoMachine create the new display without querying the user. If the
# server supports only one concurrent connection, the connecting user
# must be the display owner set in this key.
# When 'CreateDisplay' is enabled, specify the resolution of the new
# desktop in the WxH format. Default is 800x600.
For NoMachine versions previous than v. 5.0.43, when there are no local X servers up and running, users need to work around this by following the steps here:
The implementation of this Feature Request avoids having to manually set-up the configuration described in the article above.