When proprietary drivers for AMD and NVIDIA video cards are installed on the server host, users get a black screen when running virtual desktops. This doesn’t occur when using Open Source drivers like Radeon or nouveau.
In order to set LD_LIBRARY_PATH for NoMachine sessions, specify path to the Mesa 3D graphics library in the node configuration, the /usr/NX/etc/node.cfg file.
To do that:
Edit the /usr/NX/etc/node.cfg file.
Uncomment the DesktopCommandLibraryPath key.
Set the proper path to Mesa library in the DesktopCommandLibraryPath key.
For example on Ubuntu 14.04 64 bit:
DesktopCommandLibraryPath “/usr/lib/x86_64-linux-gnu/mesa”
and on Ubuntu 14.04 32 bit:
DesktopCommandLibraryPath “/usr/lib/i386-linux-gnu/mesa/“
Path to be set in the DesktopCommandLibraryPath key must point to the directory containing the libGL.so* libraries.
Reference:
https://www.nomachine.com/AR09L00814