If you have USB support disabled among the NoMachine services, it is likely that the USB module has not been compiled on your Linux during the installation of NoMachine.
There are two ways to check whether it has been compiled or not:
1) You can verify it by typing the following in a command prompt:
ls -l /usr/NX/bin/drivers/
If the output is empty, it's a sign that nxusb.ko is not compiled.
2) Alternatively, you can verify it by checking the install log file placed in the /usr/NX/var/log directory.
To separate usb install information use the following command:
cat /usr/NX/var/log/nxinstall.log | grep -i usb
The install log will report a similar message to this:
NX> 700 Compiling usb module.
NX> 700 Cannot compile USB module.
NX> 700 Support for USB forwarding over the network will not
NX> 700 be available.
NX> 700 To compile USB module be sure that Linux kernel headers
NX> 700 are available. You can then update this installation.
If you want to activate support for USB forwarding, you need to install the Linux kernel headers and be sure that the 'make' program is available on your system.
How to install the kernel headers
First of all, retrieve the kernel version of your machine:
# uname -r
Let's say that this command returns ' 3.1.0-1.2-desktop", download and install the kernel headers for such kernel version as explained below.
On SUSE and other distributions using Zypper program:
# zypper install kernel-desktop-devel=3.1.0-1.2
On Red Hat and other distributions using yum program:
$ sudo yum install kernel-devel-3.1.0-1.2
On Ubuntu and other distrubutions using the apt-get program:
$ sudo apt-get install linux-headers-3.1.0-1.2-desktop
Then, ensure that you have all the necessary tools to compile: gcc and make. You can verify if they are present by running from command line.
On SUSE/Red Hat and other distributions using RPM, run:
# rpm -qa | grep gcc
# rpm -qa | grep make
On Ubuntu and other distributions usinf DPKG, run:
$ sudo dpkg --get-selections | grep gcc
$ sudo dpkg --get-selections | grep make
If gcc and/or make are not present, you have to install them.
On SUSE and other distributions using Zypper:
# zypper install gcc
# zypper install make
On Red Hat and other distribution using yum:
$ sudo yum install make
$ sudo yum install gcc
On Ubuntu and other distributions using apt-get:
$ sudo apt-get install gcc
$ sudo apt-get install make
When the environment is ready and you have acquired all the necessary packages, please do the following (assuming that NoMachine is installed in /usr/NX):
1. Navigate to /usr/NX/share/src/nxusb
$ cd /usr/NX/share/src/nxusb
2. Build the module as non-privileged user:
If the build fails due to permission problems, please run the following command:
$ sudo rm -rf /usr/NX/share/src/nxusb/include/linux
And then retry:
If there are still problems with permissions, run the compilation as root.
IMPORTANT: Do not use 'sudo make' because sudo drops the PWD environment variable and causes compilation problems. Use 'su' and then run 'make' command instead.
3. When the module has been built, copy it to the drivers directory:
$ sudo cp nxusb.ko /usr/NX/bin/drivers/
4. Clean the build directory
$ make clean
After compiling the kernel module it's a good idea to check that it loads correctly on the machine where you compiled it. To do this start a NoMachine connection, open the Menu -> Devices -> Connect a USB device, and wait 10 seconds until available devices appear. Then, open a terminal on the host where you compiled nxusb.ko and type:
lsmod | grep nxusb
If the output is not empty, the nxusb kernel has been compiled and loaded correctly on your machine.