How To: Install the Leap Motion Driver & SDK outside of Ubuntu/Debian Linux

The Leap Motion Leap sensor forms part of some research I’m working on atm, but the drivers only come as .debs packaged for Ubuntu or other Debian-based distros. As I’m on Arch (and don’t really want to run dpkg alongside pacman), I wanted a way to pull out the files from the .deb bundle and stick them in the right place. Luckily, it’s pretty easy to do – here’s how…

Download and Extraction

So, let’s say you go to and get yourself a copy of the most recent Linux driver, which at the time of writing is: Leap_Packages_1.0.9+8411_Linux.tgz.

Extracting the archive will give you two files:
Leap-1.0.9+8411-x64.deb, and

If you look at either of those two files with Archive Manager you’ll see the file data.tar.gz within ’em. Pick your flavour (32-bit is x86, while 64-bit is x64) and extract it.

Inside the data folder you’ve just extracted you’ll find three directories:
lib, and

Scripted Install

In the folder with the above etc, lib and usr folders, create a file (call it anything you like, for example) and dump the following into it:

Now chmod +x the file so it’s executable and we’re almost ready to go. Unfortunately this doesn’t allow for that easy uninstallation, but you can just manually ‘nix it by throwing the following into another script:

Optional: Reload udev rules

Try skipping this section for now and come back to it if your device doesn’t register, ok?

Apparently udev uses the inotify mechanism so you don’t need this (source: but I did this anyway and it worked:

Start the daemon & visualiser

Now that’s all done, you should be able to start the Leap daemon with:

Then plug your leap sensor in and it should work when you run ‘Visualizer’ or such. Cheers!

Leap visualiser on Linux

Update – July 2016

Doing this again today, I needed to move the contents of the /usr/share/Leap folder (i.e. *.ldat) to the /usr/local/sbin folder for leapd to start without errors – also, as mentioned, be sure to run leapd as sudo or it’ll launch (with websocket errors) but it won’t work. Also, I moved the *.so files, “platform” folder and “Playground_Data” folders into /usr/local/bin, which has made that folder a bit of a dog’s breakfast, but it works… Probably a better idea to use “alien” to install the deb, or make a PKGBUILD on arch than this hacky way of cobbling it together.

How To: Install the official Oracle JRE/JDK in Linux

Installing the official Sun/Oracle Java implementations used to be as easy as installing sun-java6-* and uninstalling all the OpenJDK and IcedTea (Java plugins based on OpenJDK) packages you could find – but you can’t get the offical “Sun” packages anymore, instead you have to go get the binaries from Oracle (who bought Sun Microsystems). You can take a swiz at the possible Java implementations here if you like.

Anyways, to get and install the official JRE or JDK (I’ll assume that most people aren’t going to be developing in Java so only want the Runtime Environment and not the full Development Kit):

  1. Head on over to: and download tar.gz version of the latest JRE, which at the time of writing is 1.7 update 7 (i.e. 1.7.0_07, the Linux 64-bit version of which is called jre-7u7-linux-x64.tar.gz),
  2. Extract the downloaded archive through any way you see fit. I’ll assume you downloaded it to your Downloads folder and extracted it there for the following commands,
  3. Create a new folder for it wherever your distro likes to put Java installs, for example:
  4. Move your extracted JRE to that location using:
  5. Update your alternatives to prefer the new version of java by running (one line at a time):

    If you’re installing the JDK you’ll prolly want to set the javac (Java Compiler) binary to the new version too using:

    The number at the end of the line is the priority of this binary out of any other java/javac/javaws binaries alternatives knows about, and goes from 1 (most important – try to use first) to 100 (least important – use only as a last resort)

  6. To make sure that the update-alternatives commands take, you can also run (again, one line at a time):

  7. Finally, to check it all really took, issue:

    and you should see some output showing that the newest version of Java is in effect, like this:

Done & dusted.

How-To: Install the latest version of Wine in LMDE

Wine Logo transparent backgroundFeb 2013 Update: More recent versions of Wine are now available in the standard LMDE repositories, so skip all the headache below and just install Wine with a s swift sudo apt-get install wine and you’re done!

The Wine “not-emulator” allows you to run Windows software under Linux, but the version in the Debian testing repos (themselves cutting edge) is pretty old, at time of writing it’s a 1.3.6 variant, while Wine 1.5.0+ is now available. Unfortunately, upgrading can be a bit of a pig if you want to build Wine yourself, so a far better solution is to find some Debian binaries and install them. So let’s do that…

Getting the Debian binaries

Wine binaries are available for a whole heap of different platforms, distros and architectures from, but in this case I’m installing on Debian, so if you are too, head on over to and grab the following packages (either 32 or 64 bit, depending on your architecture – I’m using 64-bit LMDE so I’ll use the 64-bit package names for this quick guide):

  • libwine-alsa-unstable_1.5.0-0.2_amd64.deb
  • libwine-bin-unstable_1.5.0-0.2_amd64.deb
  • libwine-capi-unstable_1.5.0-0.2_amd64.deb
  • libwine-cms-unstable_1.5.0-0.2_amd64.deb
  • libwine-dbg-unstable_1.5.0-0.2_amd64.deb
  • libwine-dev-unstable_1.5.0-0.2_amd64.deb
  • libwine-gl-unstable_1.5.0-0.2_amd64.deb
  • libwine-gphoto2-unstable_1.5.0-0.2_amd64.deb
  • libwine-ldap-unstable_1.5.0-0.2_amd64.deb
  • libwine-openal-unstable_1.5.0-0.2_amd64.deb
  • libwine-oss-unstable_1.5.0-0.2_amd64.deb
  • libwine-print-unstable_1.5.0-0.2_amd64.deb
  • libwine-sane-unstable_1.5.0-0.2_amd64.deb
  • libwine-unstable_1.5.0-0.2_amd64.deb
  • wine-bin-unstable_1.5.0-0.2_amd64.deb
  • wine-unstable_1.5.0-0.2_amd64.deb

Satisfying Dependencies

jp helpfully provided details that for the above packages to install without issue, you’ll first need to install the packages:

  • libc6-i386
  • lib32asound2
  • libc6-dev-i386

So do that via your mechanism of choice, for example, if you use apt-get then you can install them though a simple:

Replacing Wine

Before you can install any new Wine stuff, you’ll first have to uninstall the wine package. Do that through whatever means you feel most comfortable with, ya know, synaptic, apt, dpkg etc.

Once that’s done, you’ll want to install all the libwine packages through dpkg (to be honest, you might not need them all – but it doesn’t hurt, and you’ll certainly need most of them).

To install all the libs, open up the location you saved all the .deb files to in the console, and run:

Once that’s completed successfully, in the same location run:

And finally, in the same location again, run:

Almost done!

Getting the gecko engine

At this point we’re 99% complete, we just need to launch winecfg and let it install the Gecko engine for web-browser shenanigans (again, you might not need this – but there’s no harm in it, and Wine’ll moan at you about it if you don’t). So just run:

And when it prompts you about gecko, just click on [Install].


New cutting-edge Wine goodness is now yours to play with, although from this point on you won’t get automatically updated as wine won’t be installed from any repository. For this reason, it’s worth holding onto all the debs so you can uninstall them with ease via a swift sudo dpkg -P *.deb (-P for purge) if at a later date you want to go back to the repo version.

As Bryant would say – Drink some for me, eh, pal? ;)

How To: Install Windows 7 Upgrade as a Fresh Install

Update: See the bottom of the post for another method of performing a upgrade install as a fresh install which only needs a single copy of your Windows 7 upgrade disc and nothing else!


I’d had enough of fighting with OpenOffice 3.2 today and finally cracked: I bought a copy of Microsoft Office 2010 Professional Academic edition for $49AUD through Microsoft’s It’s Not Cheating program.

However, since I run Linux I thought I’d just get a copy of CrossOver and I’d be laughing, but this was not to be. I ponied up for Office, set it downloading, then went to get CrossOver only to find it only supports up to Office 2007 – and I don’t mean that Office 2010 won’t work 100%, or will be a little eratic – it won’t work at all. Feck!

Okay, so I can always run it through virtualisation (i.e. a VirtualBox or VMWare instance running some variety of Windows), but I didn’t fancy running the latest, greatest Office on a shonky old copy of XP, so I ponied up (again) for a copy of Windows 7 64-Bit Upgrade (that’s another $49AUD through It’s Not Cheating) and created a new virtual machine, installed Windows 7, entered the key at the end of the install, and it told me it wasn’t valid! Double feck!

At this point I’m $150AUD out of pocket with nothing to show for it, and am starting to furrow my brow.

Trying to deal with the key issue later – I just left the key out to get 7 up and running (it’ll go for 30 days without activation) and tried the key again from within the OS rather than from the installer; this time instead of just key invalid I got an error message stating that this key is not valid for a clean install of Windows… Okay.. now we’re getting somewhere – let’s fix this bad boy.

The Fix

There’s a bunch of stuff on the Web about forcing Windows 7 to accept a clean install from an upgrade disc by creating registry keys, running arcane commands (slmgr -rearm etc.), removing config files from the ISO before install etc. – and to be perfectly honest I didn’t fancy re-installing so I had a quick whirl at all of ’em. And guess what? They didn’t work, so I’m not going to post them here. Instead I’ll tell you what worked for me [drumroll please….]:

Installing another version of Windows first.

No, really.

It doesn’t have to be 64-bit if you’re migrating 32-bit to 64, it doesn’t have to be one step below Windows 7 (i.e. Vista), it doesn’t even have to be a legal, valid version of Windows! It just has to be some incarnation of Bill’s Marvelous Blue-Screen Machine, and then when you install Windows 7 on top of the existing install, it’ll recognise a prior version of Windows existed, and your “upgrade” key will work perfectly.

Windows 7 Activation
Ba-da-bing Ba-da-BOOM! Shamone! =P

So in my case, this just meant slapping a copy of XP onto a new virtual machine, then the instant that’s finished installing, just changing over the ISO image mounted on the virtual DVD drive from XP to 7, rebooting, and letting this second version of Windows install.

Once you’ve got Windows 7 up and running, your “old” copy of windows will be sitting in C:\Windows.old, and you can either use the built-in Disk Cleanup tool to remove it or just delete that folder and you’re as good as new*.

* = If you’re doing a native Windows 7 install, once you’ve removed the old install then you’re quite literally good as new. If you’re installing on a virtual box using a hard drive which uses dynamic storage (i.e. you allocate, say, 60GB for the HD, but it doesn’t take up any space to begin with, it only takes up space when data is added to the drive) then the space allocated for the old Windows install can’t be fully recovered because dynamic disks can take up more space, but do not resize back down to take up less space when you remove data! But you’re going to put more than 700MB of additional stuff on it anyway, right? So just remove the old Windows install before installing new apps and the like and you’ll break even!

Windown 7 - Remove Previous Windows Installations

It’s not a glamorous hack or sneaky workaround, but it does work, and who doesn’t have an old copy of Windows sitting around somewhere? If you’re feeling particularly cheeky you could try it with a copy of Windows 3.1 or 95 installed and see if it still upgrades clean ;-)

Update: I was discussing this with some colleagues the other day who clued me in to the following rather sneaky (but perfectly legitimate) method of installing Windows 7 Upgrade as a “fresh install”:

  1. Install Windows 7 as a fresh install and do not enter your key while installing.
  2. From within your installed and running (but not activated) version of Windows 7, go to your Windows 7 disc and install it again!
  3. If your Windows 7 Update disc doesn’t show setup type stuff (because it’s UDF and there’s all sorts of issues), just reboot the machine and install Windows 7 over Windows 7, um, dawg ;)

Flattr this

How-To: Transform Your Stock Ubuntu 10.04 Install into a Fully Operational Battle Station Operating System

I used to upgrade my Ubuntu distros after each release cycle, but it was never a very pleasant experience… There’d always be mismatched packages and configs, legacy cruft left lying around filling up my root partition, and all sorts of mismatch woes – so I ditched that for separate partitions for my root folder and home folders, and now wipe the root folder with the newest release as and when it’s out.

Because I’ve done this a couple of times over the last few years, I feel I’m getting pretty good at getting the machine up & running with everything I need at a pretty fast pace: maybe a day for all the core stuff, another to tweak the vast majority of everything so I have it as I want, and then just bits and pieces as they come up. This time, I thought I’d make a list of all the things I install (yes, I know you can automatically generate a list of installed packages) – because I also wanted to note why I install ’em, you know, what are they good for, so the next time I install a fresh system I can just grab it all even quicker.

Now, a stock/standard Ubuntu distro is a pretty good thing – but it doesn’t come with everything you need, so with that in mind, I’d like to present a list of things that I think you also need, and that once you have in place you’ll be able to do most anything you need with your system with just a few clicks. Before you do any of this, it’s a good idea to open up System | Administration | Software Sources and enable the restricted, universe and multiverse repositories as shown below:

Ubuntu Software Sources

With that done, here’s the list of things you’ll likely want to have installed in no particular-order, and only roughly sectioned off into classes (system, sound & media, social networking etc.):

Freely Available In The Ubuntu Repositories
Package Name Why Install It?
System / Developer / Essential
ubuntu-restricted-extras Meta-suite of proprietary software including the Flash plugin, DVD decoding libraries etc.
build-essentials Tools to compile your own/open-source projects
eclipse Multi-Language IDE – coding is good.
codeblocks Another multi-language IDE, I’ve not used it too much as yet, but I hear good things about it…
subversion Version control tool. Useful to checkout code trunks and compile open-source projects yourself
scons Python-based build system – req’d to compile SCons-based projects (More info:
guake Quake-style terminal access for gnome. Awesome stuff. Change the keybindings for copy and paste to Ctrl+C and Ctrl+V for usabilities sake.
nautilus-open-terminal Nautilus script that adds functionality to allow you to right-click on a folder and open a terminal at that point, saves you cd-ing all the way into long paths.
php5 It’s PHP. Version 5. Drags in apache2 with it.
deskbar Search applet for the panel – finds your programs in the menu, amongst a hundred other things. I really couldn’t live without this.
Utility / Office / Comms
thunderbird Thunderbird 3, my email client o’ choice. I’d written a guide for installing it in Ubuntu 9.10, but it’s in the repos in 10.04, so that’s now obsolete…
p7zip-full 7zip archiver. Better compression than zip and a completely open format.
pidgin Multi-chat-format-client (MSN, AOL, YahooMessenger etc.) I don’t like the packed-in empathy client too much…
pidgin-plugin-pack Additional plugins for pidgin.
xchat IRC (Internet Relay Chat) client
Audio / Video
audacity Very good audio editor
ripperx Decent audio CD ripper, use with LAME. Also, it’s the only ripper I’ve found that doesn’t randomly fall over if it doesn’t like a CD…

Warning: The current version (v2.7.2) has two bugs which are kinda scuppering it: it doesn’t add ID3 tags to tracks ripped beyond track 10, and it crashes at the end of each disc rip =/ It might be better to use something else for the time being, but I really don’t like SoundJuicer or anything, so I just run MusicBrainz Picard (package name: picard) on any folder of MP3s ripped from a disc to fix up the tags after ripping.

lame The best mp3 codec to rip audio with. Use high quality VBR and the results are superb.
soundconverter Easily convert audio files between formats.
pautils PulseAudio utils, stream choosers, volume controls etc.
gpodder Really good podcast client for gnome: subscribe to Linux Outlaws, This Week in Tech (TWiT) etc..
mplayer Useful to get data to transcode .avi files to to DVDs (see this article if you’re interested).
ccsm Compiz config settings manager – lets you tweak your compiz effects in countless ways…
compiz-fusion-plugins-extra Additional effects for compiz
fusionicon A system tray icon for accessing compiz related settings and switching/reloading window managers. Best to set it to autorun on boot through System | Preferences | Startup Applications.
python-sexy Library used by compiz to extend Gtk widget functionality.
gnome-colors Additional icon themes – more choice is never a bad thing.
screenlets Widget system for the gnome desktop. Grab some more screenlets from here if you like (the NVidia and FuriousMoon screenlets are useful/pretty respectively).
gimp The GNU Image Manipulation Program, which isn’t included on the CD for the first time this release..
gimp-plugin-registry Useful GIMP plugins, including “Save for Web…”, which is a daily-use tool for me…
cheese Mess around w/ your webcam
camera-monitor A panel applet which indicates when your webcam is switched on – so you’ll know if anybody else is messing around with your webcam!
blender 3D modelling package. I WILL learn how to use it this year, fo’ real!
povray An old-school but excellent ray-tracer (creates images by back-tracing light rays from geometry), always good for a mess around. Get povray-examples and povray-docs while you’re at it.
cbrpager A simple comic viewer for gnome
Administration / Files / Network
gadmin A suit of GUIs to administrate things on your system (proftpd, apache, squid etc.)
proftpd FTP server, requires a fair bit of configuration, but I’ve written pretty solid article on it here if you’re interested in hosting files on your own FTP server..
filezilla An excellent FTP client to connect to FTP servers.
sabnzbdplus A really good news group client – download stuff with far more peace of mind than using torrents. I’ve also written a guide for downloading stuff from newsgroups which you can find here if you’re that way inclined…
pypar2 Tool to repair broken/corrupted/incomplete rar files using PAR(ity) files. Use with sabnazbdplus as and when needed.
transmission An excellent bit-torrent client. Don’t forget to: Enable the block list & update it, change encryption settings from “preferred” to “required”, and disable DHT peer exchange (here’s why: unlinked – thread now gone)
dosbox A legacy PC emulator – run old DOS software if you need to. I use it to fire up ScreamTracker 3 occasionally.

There’s a few other things you might want which aren’t in the standard Ubuntu respositories, too. Such as:

Not Available In The Ubuntu Repositories
Application Name Why Install It? Get From
webmin Tool to administrate your system through a web interface either locally or over the web. Either restrict administration to be from the local network or make your passwords strong if you allow external access from teh Internets!
google-earth Gaze longingly at home, and the pyramids, and other neat stuff on this blue/green sphere.
google-picassa Nice image organiser/basic photo adjustment tool. Can categorise images by faces (poorly) too! [I had to install this from the commandline for some reason. Used: sudo gdebi ./picassa-3_0-blah-blah.deb to install] Newer versions not available for Linux =(
virtualbox Virtualisation software so you can run stuff like XP/Vista/Windows 7 from virtually from within Linux. Get this from Sun rather than the OSE (Open Source Edition) in the repositories if you want USB support.
handbrake Simple and yet powerful DVD ripper/video transcoder with a decent GUI. If you’re ripping a DVD just point it at the top level directory of the DVD and hit Open for it to pull in all the .vob files for you.

Update: Don’t bother installing version 0.9.4 on Ubuntu 10.04 – it’s broken. Build yourself a working version from the freshest source using this guide!
nautilus elementary Nice transparency effects for Nautilus
ubuntu tweak Tweak ubuntu like a mother-b

You might not need some of that stuff, but for me it turns a good basic install into the real deal that does everything I need. And I absolutely love it :D