NoMachine adventures on openSUSE Leap and Tumbleweed

NoMachine is a very good remote desktop solution for Linux. It installs fine on openSUSE Leap while on openSUSE Tumbleweed the necessary systemd service, nxserver.service, does not get installed. After manually installing nxserver.service, all is good.

I had posted about my remote desktop experiments some time ago. I ended up using NoMachine and have never had to worry. Until yesterday. Yesterday, I had to dig a bit deep.

NoMachine ON openSUSE LEAP

NoMachine have made an rpm package, a deb package and a tar.gz package available. They also clearly mention that the rpm is suitable for openSUSE 15.x. No mention of Tumbleweed. So, I grabbed the 64-bit tar.gz package from their website hoping it would give me more control if something goes wrong.


The general installation instructions are:

  1. Click on Download and save the tar.gz file in the /usr directory.
  2. Extract the tar.gz archive by running from command line:
sudo tar zxvf nomachine_7.4.1_1_x86_64.tar.gz

3. Execute the following to install:

sudo /usr/NX/nxserver --install

The installation is pretty straightforward and within a minute you are ready to connect.

NoMachine ON openSUSE TUMBLEWEED

Performed the same steps, but a failure occurred:

NX> 700 Running: systemctl restart nxserver.service.
NX> 700 ERROR: Cannot enable systemd service: .
NX> 700 Server install completed with warnings.
NX> 700 Please review the install log for details.
NX> 700 Install completed with errors at: Mon Apr 05 16:17:09 2021.

I tried to start nxserver.service manually and found it does not exist.

The following also returned a null result:

systemctl list-units --type=service | grep nx

Navigated to /etc/systemd/system/ and searched for the unit nxserver.service. It just did not exist.

I went to my openSUSE Leap machine, navigated to  /etc/systemd/system/multi-user.target.wants and examined the nxserver.service file. It was a symbolic link to /usr/lib/systemd/system/nxserver.service.

Great! Armed with this knowledge I searched my openSUSE Tumbleweed machine. There was no /usr/lib/systemd/system/nxserver.service file. Then, it occurred to me that the file nxserver.service might either:

  • be dynamically generated one, in which case I would need to copy it from my openSUSE Leap machine and change any environment-specific variables
  • or might be present in the tar.gz, in which case I could just deploy the file to required locations and see if it works

I found nxserver.service in the /usr/NX/scripts/systemd directory (the tar.gz was extracted here). I examined the contents and found no environment-specific variable seeking my blessings:

[Unit]
Description=NoMachine Server daemon

After = syslog.target network.target network-online.target sshd.service http-daemon.target.service htd.service
Wants = network-online.target

[Service]
User=nx
Group=nx

ExecStart=-/etc/NX/nxserver --daemon

KillMode=process
SuccessExitStatus=0 SIGTERM
Restart=always

[Install]
WantedBy=multi-user.target

Finally,

  1. Copied nxserver.service from /usr/NX/scripts/systemd to /usr/lib/systemd/system
  2. Then, created a symbolic link to match the openSUSE Leap situation
ln -s /usr/lib/systemd/system/nxserver.service /etc/systemd/system/multi-user.target.wants/

3. Then enabled nxserver.service

sudo systemctl enable nxserver

4. Started and enjoyed

sudo systemctl start nxserver

CONCLUSION

NoMachine is a very good remote desktop solution for Linux. It installs fine on openSUSE Leap while on openSUSE Tumbleweed the necessary systemd service, nxserver.service, does not get installed. After manually installing nxserver.service, all is good.