Getting the OpenNI and PrimeSense drivers working on Ubuntu

Here’s an overview of the process to get the OpenNI and PrimeSense drivers working with the Kinect and Ubuntu. Begin by installing some dependencies:

sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev doxygen graphviz mono-complete

Make a directory to store the build, then clone the OpenNI source from Github.

mkdir ~/kinect
cd ~/kinect
git clone

Run the RedistMaker script in the Platform/Linux folder and install the output binaries

cd OpenNI/Platform/Linux/CreateRedist/
chmod +x RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.2.23/
sudo ./

Next, clone the Avin2 SensorKinect source from Github.

cd ~/kinect/
git clone git://

Run the RedistMaker script in the Platform/Linux folder and install the output binaries.

cd SensorKinect/Platform/Linux/CreateRedist/
chmod +x RedistMaker
cd ../Redist/Sensor-Bin-Linux-x64-v5.1.0.25/
chmod +x
sudo ./

Then download the OpenNI Compliant Middleware Binaries to ~/kinect Select these options from the dropdown menus: Unstable PrimeSense NITE Unstable Build for Ubuntu 10.10 x64 v

Extract the contents of the archive and switch to the Data directory contained within.

cd ~/kinect
tar -xvjpf nite-bin-linux-x64-v1.5.2.21.tar.bz2
cd NITE-Bin-Dev-Linux-x64-v1.5.2.21/Data

Now modify the license in the files: Sample-Scene.xml, Sample-Tracking.xml, and Sample-User.xml. Change

<License vendor="PrimeSense" key=""/>


<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4="/>

Change back to the NITE directory and run the install script.

cd ..

sudo ./

That’s it! If you followed steps through to here you should be able to run the sample applications.  The OpenNI samples are here:


and the PrimeSense samples are here:


Note: if you get the error:

InitFromXml failed: Failed to set USB interface!

the solution is to remove the gspca_linect kernel module:

sudo rmmod gspca_kinect

comments powered by Disqus