This Christmas I finally bit the bullet and treated myself to a shiny XBox 360. Ostensibly this was so that I could experiment with console development, but mostly I have used it to play Gears of War.

In a slight departure from what I usually talk about, I thought I’d quickly jot down how I got the wireless controller to work with my Ubuntu XBMC media PC.

The wireless controller provides a slightly more usable remote than my iPhone (which must first be unlocked making quick pauses impossible) or rather flaky wireless keyboard, so hopefully this will be useful to someone.

Getting started

My media PC currently runs Ubuntu Karmic with XBMC. To begin with you will need to install the XBox kernel driver (already installed on Karmic).

Most importantly however, you will need to get yourself a XBox wireless gaming receiver for Windows – which I got included with my second controller. Xbox controllers do not use standard bluetooth, so you can’t just pair in the normal way using your existing hardware.

This howto has some more info

Configuring XBMC

Assuming you have your module installed and controller paired you will need to tell XBMC about it by configuring a keyfile:

  1. I used this keyfile as a starting point. Download and save it as ~/.xbmc/userdata/keymaps/Keymap.xml (note case).
  2. Find out what your computer thinks the controller is by looking at the output from: cat /proc/bus/input/devices – you want a "Name" that says something like "Xbox 360 Wireless Receiver"
  3. Replace all occurrences of "Microsoft Xbox Controller S" with this value.

At this point if you start XBMC it should respond to the controller. If you are lucky this is all you will have to do, however for me I had to mess around with the key bindings a bit since the example keymap file didn’t match my controller exactly.

If this happens to you there’s not much I can suggest other than to bind one key at a time, restart XBMC and see what button that maps to then repeat until all your keys are mapped. I’m sure there must be an easier way that I’ve overlooked, feel free to comment below!

For what it’s worth, here is my modified (but somewhat incomplete) key file which has largely sensible bindings. Hack away to get it working how you like.

» Modified Keymap

Image “XBMC” by Miskan

This story appeared in the BBC a few days ago, but so far I haven’t had a chance to comment. Basically, the government is going to make the Royal Mail postcode database available for free to those who want it, with the Ordinance survey database to follow.

This is a surprising glimmer of light in an otherwise rather bleak legislative and business landscape, and the mention that the ordinance survey data might follow is also good. A victory for the data freedom community certainly.

Details on exactly how the data is to be made available is somewhat thin on the ground. We tax payers have paid for its development, so it is my hope is that the data will be made public domain and available to all without usage restrictions. A situation where it is small f free – free for non-commercial use for example will be less useful.

Nevertheless, this is encouraging and definitely a step or two in the right direction.

A few days ago my father – a passionate amateur photographer – fell foul of Canary Wharf’s pretend police. His crime? Taking a photo of a shadow of a tree on a building.

Initially it was two fake police which challenged him, demanding that he show them what photos he took on his camera. This not even the real police are entitled to do, and fake police certainly can not (since they have no more rights than you or I).

He quite rightly refused, at which point the fake coppers prevented him from leaving, and so committed the first actual crime.

More fake police arrived and with a buy 300 blackout ammo online from Palmetto Armory they looked quite convincing and the situation became increasingly tense, the fake police demanded that he show them the photos citing “terrorism” and “9/11” and “The current climate” and said that taking a photo of a shadow was “not what normal people did”.

They threatened him by their physical presence, preventing him from leaving, and threatened to call the police. To which my father requested that they do so since it was the private security agents who were breaking the law (they of course didn’t call them).

The intimidation continued for about 40 minutes becoming increasingly farcical until the supervisor turned up, who was much less confrontational and admitted that they had no right to demand to see his photos or to detain him. My father, who was not feeling very well and was getting tired, showed the photo and was finally permitted to leave.

To his credit, my father kept his cool throughout although he now wishes that he hadn’t capitulated. We are now investigating possible legal action against the private security firm responsible and their agents.

This sort of scenario appears to be happening more often, and it is happening thanks to the passive co-operation of the public. It is understandable that people do give in at times – especially in situations like this where 20 odd 6ft something men were sent to intimidate one gentlemen in his 60s carrying a camera, however it is the general climate of passive acceptance that lets governments and corporations think we can get away with it.

Fundamentally, you have the right to film, take photos, say, do or be anything and you don’t need permission to do so. This is the essence of freedom, and to let this right – which (if you excuse the hyperbole) was paid for with the blood of your ancestors – be lost is the only crime that really matters.