How to get started with Kinect for Windows on Ubuntu using OpenNI

The Kinect can be connected to a computer and used for a lot of fun projects. OpenNI is a popular library that is used by many applications and libraries to use the Kinect. You can also use the OpenNI API in your programs to access the output of the Kinect. This post describes the steps I used to get OpenNI working with the Kinect for Windows sensor on Ubuntu:

Preliminary checks

  1. This post is about the Kinect for Windows sensor. It is not about the Kinect for Xbox 360 sensor. If you don’t know which type of Kinect you are using, read about the difference between the two types of Kinect.
  2. Plug the power plug of the Kinect to a power source. Plug the USB plug of the Kinect into your computer running Ubuntu. You should see the light on the Kinect blink slowly in green color.
  3. Ensure that the Kinect has been identified by the Linux kernel. You can check this by listing all the USB devices as described in this post. Check if the 3 devices described in that post are listed with the correct product and vendor IDs.

Install unstable branch of OpenNI 1.x

By default, OpenNI does not ship with the drivers for Kinect. Also, OpenNI 2.x does not seem to work with Kinect for Windows. To use the Kinect for Windows sensor on Ubuntu, it seems that the unstable version of OpenNI 1.x should be used.

Get the unstable branch of OpenNI 1.x code:

$ git clone
$ cd OpenNI/
$ git checkout -b unstable origin/unstable

Compile the OpenNI code:

$ cd Platform/Linux/CreateRedist/
$ ./RedistMaker

Install the OpenNI headers, libraries and binaries on the system:

$ cd ../Redist/
$ cd OpenNI-Bin-Dev-Linux-x64-v1.5.4.0/
$ sudo ./

You now have OpenNI installed. However, it cannot yet communicate with your Kinect for Windows sensor. To get that working, we need to install the Kinect drivers.

Install SensorKinect drivers

These are drivers that have been modified to work with OpenNI 1.x (not OpenNI 2.x) on Linux. We need to compile and install this to use the Kinect. Compilation of these drivers needs OpenNI to be installed, which is why we did that step first.

Get the code of SensorKinect:

$ git clone
$ cd SensorKinect/

Compile the SensorKinect driver code:

$ cd Platform/Linux/CreateRedist/
$ ./RedistMaker

Install the SensorKinect drivers:

$ cd ../Redist/
$ cd Sensor-Bin-Linux-x64-v5.1.2.1/
$ sudo ./

You now have the drivers installed on your system.

Start playing with Kinect

It is time to check out if your Kinect for Windows sensor works on Ubuntu. The OpenNI directory has some tools that can be used to start playing with your Kinect. Go to OpenNI/Platform/Linux/Bin/x64-Release and try them out. For example, the NiViewer tool displays both the RGB and depth output from your Kinect.

Tried with: Kinect for Windows, SensorKinect, OpenNI unstable, Linux 3.2.0-48-generic and Ubuntu 12.04 LTS

8 thoughts on “How to get started with Kinect for Windows on Ubuntu using OpenNI”

  1. Hey. Thanks for the tutirial. By the way, do you know if there are any 3D scene reconstruction tools are there with the Kinect for Windows device in Ubuntu 12.04?


  2. I could build both, but then when I try to open the demos NiViewer in OpenNI/Platform/Linux/Bin/x86-Release, it gives an error :
    One or more of the following nodes could not be enumerated:
    [Nothing listed here actually]

    A more informative error comes up when i try Sample-NiCRead:
    Reading config from: ‘../../../../Data/SamplesConfig.xml’
    One or more of the following nodes could not be enumerated:
    [empty too]

    it seems like not a big deal, but i can’t test the kinect.


  3. I followed the steps exactly and installed both of them but when I connect my kinect device, it shows an error
    Device: PrimeSense/SensorV2/ the device is not connected!

    I downloaded the PrimeSense module from but while making redist, its thought an error
    bash: ./RedistMaker: Permission denied

    What should I do now?


  4. Hey, thanks for the tutorial. I am facing problem with installation of SensorKinect driver code. ./RedistMaker is not working. It is showing error and no Redist folder is made in the same. I am using ubuntu 14.04. Can you please help me with it?


  5. Any chance someone figured out what the “One or more of the following nodes could not be enumerated:” problem ? I am struggling with running the openni samples on a Raspberry Pi with an Xbox 360 kinect…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s