Having recently acquired a bluetooth GPS receiver for as little as 20 €, and just having switched to KDE 4, i tried to combine those two, and write a little plasmoid to show the current position on the desktop.
And that is basically everything to say, enjoy the little applet.
Make sure gpsd is installed and set up properly. Also make sure the python bindings are installed.
In Ubuntu you would need to:
sudo apt-get install gpsd python-gps sudo dpkg-reconfigure gpsd sudo apt-get install python-plasma python-dev
After those are installed, you can proceed to install the plasmoid with plasmapkg -i.
Problems and TODOs
This is all rather dirty and bloated. The correct way to do it would probably be to write a data engine for plasma, which would provide the positional data. Maybe someone will do it, especially if Marble will one day
be able to support overlays integrate GeoClue or something similar.
Right now the data travels from the GPS device to the PC in the form of NMEA sentences, gets then converted into gpsd’s own format, python-gps connects to gpsd over TCP port 2947, interprets the gpsd output, hands it over to the applet, which reformats the data yet again. For something so useless that just wastes too many CPU cycles. Interpreting GPS data entirely in python is not hard, but still a bit harder than with gpsd, especially if one wants to cover a lot of GPS devices. Don’t get me wrong, gpsd does its job quite well, it is just a bit overkill for this task.
Another improvement would be readable coordinates. Something like “10 km northwest of Zürich” or even “200 meters south of Sternen Oerlikon, Zürich” would really be much more useful.
Update February 2010: Version 0.16 now uses KDE’s geolocation data engine. This drops the (direct) dependency on gpsd, and allows for ip-based location – unfortunately i now can no longer get my gps to work with it, hoping for kubuntu lucid.
gps-plasmoid_0.16.plasmoid (5.85 kiB, 2010-02-13)
gps-plasmoid_0.15.plasmoid (2.59 kiB, 2009-04-11)