Using the Leap Motion Controller with Kubuntu Linux

The amazing Leap Motion controller (image: LeapMotion.com)

In that post you’ll learn how to install the beta drivers for your Leap Motion Controller on Kubuntu Linux 12.04 LTS. The procedure should work for Ubuntu, too. If not, give Kubuntu a try.

My setup is as follows:

Kubuntu 12.04 LTS 64 bit running on
Thinkpad W520, 32 GB RAM, BumbleBee Nvidia Optimus driver

Where to get the driver and how to install it

The Linux driver is bundled with SDK for Linux. In order to download the SDK goto https://www.leapmotion.com/developers and sign up for a developer account. You can use the same account later for the AirSpace app store.

Once you’re logged in to the development area, click on “Downloads” in the top menu and then download the Linux SDK.

Download Linux SDK

Unzip the archive and go into the unzipped folder. I do this using the Konsole application. When in Dolphin or Konqueror you can press [F4] to open the konsole at the current folder. You’ll find two deb files. Install Linux drivers
The one ending with x86.deb is for 32 bit and the one ending with x64.deb is for 64 bit Linux installations. If you’re unsure if your system is 32 or 64 bit execute that command in the konsole:

uname -p

To install the driver for your platform execute with your driver deb-file:

dpkg -i Leap-0.8.0-x64.deb

If you are not a developer chance are good that you need to install some depending libraries first. You’ll know if dpkg complains when trying to install. You can use sudo apt-get install in the konsole to install those dependencies first and then try to install the leap motion controller’s driver again.

Download start script

When you’ve installed the driver it’ll print that you need to start the leapd service and LeapControlPanel. As we’re all friends of usability I wrote a simple bash script that does that for us:

Download leapup.sh and place it somewhere in your home folder.

Create menu entry

The next step is to create an entry in the K-Menu:

  1. Right click on the K-Menu button and choose to Edit Applications.
  2. Select the System entry and choose “New Item” from the toolbar as shown above.
  3. Enter “Leap Up” as name and select the leapup.sh command to be executed. I used that icon: Leap controller 48 pixel icon
    Also you might want to uncheck “Enable launch feedback”.

Create menu entry under System node

Configure start script to autorun on login

Now it’s time to make KDE start the script for us as soon as we log in. Goto System Settings and select Startup and Shutdown as shown below.

Select startup configuration

There you’ll want to click on Add Programm and choose the Leap Up entry from K-Menu’s System folder.

Choose the Leap Up entry to be run on startup

After you’ve added it make sure it’s executable be selecting the entry and clicking on Properties. Switch to the Permissions tab and make sure Is executable is checked.

Make sure the Leap Up script is executable

The next time you log in to KDE the Leap Control Panel will start automatically and in your system tray there’s a symbol showing the state of your controller. From now on all you need to do is plugin your Leap Motion controller and it’s ready to go!

Leap controller panel in the system tray

Compatibility and integration

Using the Leap Motion controller for a couple of days with Kubuntu Linux I found the following issues:

  • When the controller is plugged in the Cheese application will crash as soon as the UI shows up. I suppose Cheese is trying to detect the controller as a webcam and fails. Unplugging the Leap Motion controller will make Cheese work again.
  • Everytime you log in to KDE the Leap Control Panel will show it’s settings dialog and I found no way to turn it of. As the content of the dialog’s pages look different than in Windows or Mac I believe that’s a feature of the beta drivers.

One more thing: AirDrum for Linux

I’ve seen that nice show case of Cyril using the Leap controller as an air drum: http://youtu.be/xdm_2FO44ug. I also found his source code on github, but it’s written for Windows. However, it took me just a few exchanges to make it run on Linux and that’s just so totally cool. I put it on github: AirDrumLinux.

Thanks Cyril!

Thanks for reading.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>