Ubi: Firefox geolocation for Linux
January 22, 2009One of the coolest technologies to come out of the recent location-awareness craze is Wi-Fi geolocation: triangulating a computer’s position by looking up nearby wireless access points in a database, without any need for a GPS. Skyhook, the company that provides the geolocation software for iPods and iPhones, has also released libraries for developers on other platforms, and more and more location-aware applications are starting to emerge.
But somehow Linux users have missed out on all the fun. While Skyhook does provide Linux versions of their libraries, real applications making use of the technology are virtually nonexistent. Neither Mozilla’s Geode plugin nor Skyhook’s own Loki toolbar are available for Linux, and it’s not obvious that either plan on adding support anytime soon. There’s absolutely no reason why this should be the case—all the necessary resources already exist. So with all this winter break free time I’ve decided to try my hand at bringing Wi-Fi geolocation to the Linux desktop. The result is a Firefox extension I’ve called Ubi. Ubi provides a javascript API for accessing Skyhook’s geolocation tools, making it possible for websites to easily request position information.
Installation
- Register for a Skyhook API key.
- Install Ubi
- Enter your username and realm in the Ubi preferences dialog
- Enjoy!
Try it out
Once you have the extension installed, check out the demo website I’ve set up. It finds nearby pizza parlors using Yahoo! local search. If you get an error the first time, make sure you’ve configured your user information properly, and try refreshing the website. If you want to develop your own application, download the client javascript library.
Other notes
The source code is included in the xpi—you can unzip it the way you would a regular zip file. Because the Skyhook library is proprietary licensing gets a bit messy: my code is all GPL, but the included binary is subject to their TOS (more information is included in the LICENSE file included in the extension).
This is really just a proof-of-concept, and the actual interface is likely to change radically in the near future. Error handling is miserable right now; my next project is to make the program more responsive about what’s going wrong.
Bugs? Security holes? Brilliant suggestions? Patches? Leave a comment or send me an email at jda2129 [at] columbia [dot] edu.
