Posts from April 2007.

Whither LugRadio’s licence

Some interesting discussion going on on a previous post here about LugRadio’s licencing terms and the length of the show. Chip in if you’ve got an opinion!

Die Broadcom

Why is it that when someone throws a free laptop in my direction it turns out to always have a Broadcom network card in it? For extra bonus credit this time this Dell Inspiron 5160 has two Broadcom cards in, one wired and one wireless. Neither of which work under Ubuntu 7.04 out of the box, so I’ve got my crappy ancient PCMCIA wired card poking out the side of it. Also, 256MB RAM, which ought to be a huge amount and instead is little enough that Gnome feels a bit sluggish despite the fact that you can store TWO HUNDRED AND SIXTY EIGHT MILLION BYTES just in memory and it’s still not enough and grnch grnch grnch. Broadcom are welcome to choke to death on my magnificent penis, by the way.

In other news, now that I have this ancient NE2000-compatible PCMCIA thing plugged in, for the first time ever I have actually seen NetworkManager detect and use a network card correctly! I thought NM was a plot of some kind foisted upon me by people who I wronged in a previous life, but no, it actually works. Fuck me.

No-one has sent me any interesting mail in the last few hours so now I have no reason to avoid this bit of work I have to do. Thanks for nothing, world. Someone tell me a joke or offer me a job or something.

New fantastic luck from gedit, too, which seems to think that it’s Talk Like A Pirate Day and is therefore highlighting the word Arr in my code. STOP IT.

GEdit decided to highlight the Arr in Array and the ay in Array in different colours

Ah no wait if I save it it goes away. I R teh win.

Back to work. Descent into the maelstrom continues.

Oh, and: free M J Ray LugRadio hatred for your viewing pleasure.

fspot2lj – export F-Spot photos to your LiveJournal photo hosting

fspot2lj is for exporting your F-Spot photos to your LiveJournal photo hosting at pics.livejournal.com. It’s not yet finished, but it works well enough to have exported all my photos and resize them all to 800×600 at the same time. It pays attention to F-Spot tags and creates LiveJournal galleries from them.

It uses my Fotobilder Python bindings (which come pckaged with it). You’ll also need Python, PyGtk, the Python SQLite bindings (which come with recent Pythons), the Python Imaging Library (called python-imaging under Ubuntu), and obviously you’ll need some photos in F-Spot.

You can check it out from Subversion with svn checkout http://svn.kryogenix.org/svn/fspot2lj/trunk/ or download it. Bug reports and complaints in the comments here for now. And yes, I know it’s a bit slow at checking the uploads.

FotoBilder LiveJournal photo gallery Python bindings

In order to move my photo gallery to LiveJournal, I needed to import lots of photos. This is doable one-at-a-time on the web, but like all good web apps, FotoBilder (which is the software that runs pics.livejournal.com) has an API which you can work with. There don’t seem to be any Python bindings, though, so I’ve written some. Go get fotobilder.py. Note that it’s not a complete implementation; I’ve only provided the stuff I need (UploadPic, UploadPrepare, a few other things). There are some niceties about it, like that you never have to worry about handling challenges because it does all that for you. Nonetheless, it seems to work for what I needed it for.

You’ll also need to get ProgressReportingHTTPConnection.py. This is a modification of the HTTPConnection object in Python’s httplib, which is part of the standard library, so that it can report progress on uploads. If you need to use httplib to send data to a remote server and you want a progress bar, using ProgressReportingHTTPConnection.py makes it easy. Simply use it like httplib.HTTPConnection but pass a function to the constructor as progress_callback; httplib will call your function with every 2KB of upload done.

Update: licenced under the GPL v2.0.

New photo gallery at LiveJournal

For some time now, I’ve been trying to work out where best to store my photos. You see, I’d like a gallery on line, so people can view it, and I’d like to be able to do simple photo editing — rotations, reflections, red-eye removal, that sort of thing. I was therefore caught between the idea of a local photo program, on my computer, and publishing those photos to an online gallery, and the idea of just having the online gallery and making sure that it’s one that can handle the editing requirements I’ve got. For some time I went backwards and forwards on this, thinking one way way best and then the other. I even toyed with the idea of writing some sort of web-based photo management app. I don’t like keeping things in two places — it’s an invitation to them getting unsynchronised. On the other hand, most of the existing web-based photo management (as opposed to photo display, for which you need nothing more than HTML) apps are shit. So, between a rock and a hard place.

One night I had an epiphany, which is: bandwidth is not infinite. Doing all my photo management online is unacceptably slow and annoying in a world where one photo might be 2MB in size. I couldn’t bear it. Of course, here, I’d fallen foul of one of the Eight Fallacies of Distributed Computing. Much as people would like to claim it, remote resources and local resources are not equivalent, at least not until we get a decent fast internet. That being the case, I needed to plump for a photo management app on my machine and then simply publish the photos online. Now, the choice of photo management app was fairly obvious: F-Spot. It’s nice, it integrates with Gnome. Its main competitor on the Linux desktop is Digikam, which is pretty good but which I just don’t like. No particular reason, and no discredit to the digikam team; it’s just not my sort of thing.

One big download later and I’d imported all my existing gallery photos into F-Spot. It also made it easier to import new photos from my camera, which was nice. Next step, then: putting these photos on the web so people can see them. F-Spot supports exporting to a number of existing photo sites (Flickr, smugmug, etc), to Gallery, the PHP online photo gallery thing, and to its own HTML layout and jimmac’s Original gallery. I was all geared up to use the HTML layout, at which point I found that it can’t be customised. I want my gallery (eventually) to fit in with the look of my site. So, I thought to myself: I’ll write something that parses that HTML, grabs all the info out of it, and then creates my own static HTML gallery. That’s a good idea.

Two months pass and I’ve done fuck all. What this actually means, when this happens, is that I’ll never get round to it. After three decades I know my own mind, even if it takes steps to hide what it’s thinking from me occasionally. In the interim, something important happened: Jono posted a few images on his website, they got syndicated onto various planets, and as everyone pulled up the image it drove our poor server to its knees. After some experimentation with ImageShack for this sort of thing, we came to the conclusion that off-site image hosting is what we need.

So Jono went to Flickr, because he hates freedom.

Flickr’s pretty good, I’m not going to deny it, but, as has been related in these pages before, I’d like to try hard to use free software only where possible. I’ve got no problem with paying a subscription to someone who’s doing the hosting for me, but I’d like to use someone who’s got open source running their site. Flickr might use lots of free software under the covers, but it itself isn’t free. Other photo sites seem to be the same; Smugmug are very proud of how they use free software, and they contribute changes and extra code back to the community in a good way, but the software for the site itself isn’t Free, so I was loath to use it.

Those of you saying “I bet you use Google!”, yes, yes I do. I didn’t say I’d succeeded in every way in not using non-free software, but two wrongs don’t make a right; just because I’d given in in certain areas doesn’t mean I should give in in all areas, does it?

And then I had a brainwave. LiveJournal is built on free software, and it’s released and available. And they do photo hosting. After a bit of looking around, I established that yes, indeed, they do, the code is open source, and so off I went to LJ. And now I have my photo gallery online. Well done, Brad and LiveJournal. I said before, a long time ago, that if the Semantic Web works then it’ll work on LJ first; looks like running a public profitable service without hiding your source away is working first there too.

It needs theming to look like the rest of my site and just generally not look horrific. I am aware of this, but I haven’t had a chance yet to properly understand the LJ “S2″ theming engine. I’ll get to it. I am also aware that by not being on flickr I miss out on being part of that community; my photos won’t show up in tag searches, that sort of thing. That is a shame, and I am indeed missing out; still, there you go.

This also means that I have finally got photos of the 2007 SOCPA mass lone protest available. Enjoy the site of Bill, Ginny, and I holding up signs in front of Westminster landmarks! And if you think we look daft then, well, where were you when we were protesting, eh?

Speaking at Guadec

My Guadec 2007 talk has been accepted! I’ll be speaking on the Sunday warmup day about the web and the desktop and Jackfield. One more thing to add to my list of events I’ll be at. Thanks to Ross Burton and the Guadec team.

LugRadio Live 2007 talk schedule announced

Get all your LugRadio Live news and updates from the LugRadio Live Latest News Blog!

We now have the talk schedule available for LugRadio Live 2007!

LugRadio Live 2007 Talk Schedule

The glory that is LugRadio Live proceeds apace. Getting the schedule together has been a pretty fun task. You’ll observe the Hour of Power doesn’t yet have names against it; we’re looking for cool submissions for demonstrations there. Let us know at the show email address, which is show at the lugradio.org domain!

ADSL recommendations

Virgin Media are starting to piss me off. Our (cable) net connection is dead slow. I’m thinking of moving to ADSL. Anyone got any recommendations as to (a) ADSL providers or (b) horror stories suggesting that I should stay on cable?

Jon Hicks’ beautiful Google Reader theme

The great Jon Hicks has put together a beautiful theme for Google Reader. Makes it look so much nicer.

Simple installation instructions for Firefox. First, install the Stylish Firefox extension. Restart Firefox to make it work. Then go to Google Reader and click on the Stylish icon on your status bar, and choose Write Style > For this URL….

Download Jon’s gReader.zip file and open greader.css from the gReader/Firefox + Camino/ folder in it. Copy the text out of it and paste it into the big textbox in the Add Style window. Add a description (I called it “Jon’s Google Reader Stylator”, but do whatever you want). And: pow! Pretty Google Reader! Everyone’s a winner. Nice one, Jon.

Jokosher VoIP work accepted for Google Summer of Code

Michael “Elleomea” Sheldon has been accepted by the Google Summer of Code to work on VoIP integration into Jokosher. This is excellent news. I put together a spec for how I’d like to see VoIP work in Jokosher a little while ago, and I’m eager to actually see it happen. Nice one Elleo; this makes Jokosher even better!

Ubuntu 7.10 to be properly Free (if you want)

Mark Shuttleworth:

Ubuntu 7.10 [the version about to go in development, due for release October 2007, codenamed "Gutsy Gibbon" - sil] will feature a new flavour – as yet unnamed – which takes an ultra-orthodox view of licensing: no firmware, drivers, imagery, sounds, applications, or other content which do not include full source materials and come with full rights of modification, remixing and redistribution. There should be no more conservative home, for those who demand a super-strict interpretation of the “free” in free software. This work will be done in collaboration with the folks behind Gnewsense.

Yaaaaaaaaaaaaay! I’ll be able to use Ubuntu and not feel slightly bad about it, because it’ll no longer be a little bit pregnant but it’ll be the loveliness of Ubuntu, with all the care and attention paid to my experience as a user. There can be no better news. Good work, Mark S and the Ubuntu team.

Those of you who are thinking “who the fuck cares?”, read my previous request for this to happen and particularly Freedom vs Features to find out why I care. You should also read Jono Bacon’s Features vs Freedom; if you fall on his side of the fence rather than mine, that’s fine, because in October we’ll both be able to be Ubuntu users without a problem. We can both be part of the conversation.

Protest against anti-protest law, London, 21st April 2007

On the 21st April 2007, me and 2000 other people will be in London, doing 20 separate ten-minute demonstrations around Whitehall to protest about the SOCPA law, which says that to demonstrate in this area you need to beg permission from the police. I personally think that having to ask permission to exercise your democratic right to protest is bloody appalling, so let’s try and do something about it!

This is being organised by Mark Thomas. You can read more about the SOCPA protest at markthomasinfo.com. Basically, you have to write to Charing Cross police station to ask for permission to demonstrate in the “SOCPA area”, so Mark’s aiming for two thousand people (he’s up to 1200 already!) to each do twenty separate 10 minute one-person protests over the course of Saturday 21st April. There are lots of buildings in the SOCPA area; choose the ones you want to demonstrate about! Most government ministries are there, McDonalds are there, there are supermarkets and the Adam Smith Institute and the BBC’s Millbank studios. Show people that SOCPA is ridiculous. Thomas has produced an info pack to help you put together what you need. In particular, you have to send a real paper letter for each protest that you’re doing to Charing Cross police station, and they have to be in at the latest by the end of the week, so if you want to be part of it you’ll need to join in quickly. There’s a little “wizard” on Thomas’s site to help you easily produce the twenty letters you’ll need!

SOCPA is a stupid law. You should not have to beg permission to protest! One woman was arrested for ringing a bell and reading out the names of war dead, which is apparently a serious threat to the republic in this day and age. The law was basically brought in specifically to stop the protest by Brian Haw, who has been demonstrating in Parliament Square since 2001. The government have tried repeatedly to have him removed or deny him the right to demonstrate, and have failed; they passed SOCPA to try and ban him and everyone else from protesting anywhere near the government buildings, and then a court declared that the law didn’t apply to Brian because he was there before the law came into effect! One point to Brian Haw and the courts; minus nine million points to the government and trying to legislate away even more of our rights. The police have said that they get about 1300 SOCPA requests a year; we’re giving them twice that in one day. Get your placard and come with us!

Here’s the route that I’ll be taking. If you want to meet up while we’re there, drop me a line! Among the mini-protests that I’m doing are ones for enforcing anti-disability-discrimination laws against websites, as is supposed to happen, and use of open formats and open source software within the government, which two things probably cover a good proportion of the people reading this!

10:30 - 10:40 Parliament Square
10:50 - 11:00 DfES
11:10 - 11:20 Centre For European Reform
11:30 - 11:40 Channel 4
11:50 - 12:00 Home Office
12:10 - 12:20 DoT
12:30 - 12:40 MI5
12:50 - 13:00 DEFRA
13:10 - 13:20 Parliament Square
14:00 - 14:10 QE2 Conference Centre
14:20 - 14:30 Tescos
14:40 - 14:50 Boudica
15:00 - 15:10 MoD
15:20 - 15:30 McDonalds
15:40 - 15:50 Hungerford Bridge
16:00 - 16:10 Treasury
16:20 - 16:30 Cabinet Office
16:40 - 16:50 DWP
17:00 - 17:10 Downing Street
17:20 - 17:30 Parliament Sq

LugRadio and the LugRadio community

We’ve just released (delayed by a day, because it was Easter Monday, a bank holiday here in the UK) “I’ll have a P“, episode 16 of season 4 of LugRadio. In addition to some conversation about the Apple TV, an interview with Ian Murdock (of Debian fame, and latest Sun employee), and the PS3, we’re also focusing a bit more on technology rather than philosophical discussion (we like technology! plus, there are only so many times you can argue that free software’s a good idea :)), and talking about the LugRadio community. What would you like to see happen in the LR community, if you’re part of it? If you’re not part of it, why not? Tell us and we’ll listen.

Oh, and listen to the show and then tell everyone else about it, too :-)

Gaim nicer notifications with libnotify on Ubuntu 6.10 Edgy

Gaim (now renamed to Pidgin, but the version I’m using isn’t that new) comes with a “guifications” plugin to do “notifications”, those little popup “toast” messages to tell you that someone’s messaged you, someone’s logged on or off, all that sort of thing. However, guifications is ugly and doesn’t look like the rest of my desktop, and there is a proper notification thing for Linux, called libnotify. Some bright spark has written a Gaim plugin to use libnotify for notifications, but it’s not available in Ubuntu edgy. It is, however, in the development release, Ubuntu feisty. Here’s how to install it (and this acts as a very tiny HOWTO for how to install stuff from an Ubuntu release other than the one you’re on).

Basically, this involves building the package from the source code. First, then, you have to tell Ubuntu that it can get source code from Ubuntu feisty. Go System > Administration > Software Sources. In the Third Party tab, click Add, and put in the APT line: textbox:

deb-src http://gb.archive.ubuntu.com/ubuntu/ feisty main universe

Add Source, Close, and Reload when it tells you that the information about available software is out of date.

Ubuntu's Software Sources window helps you configure where software comes from

Next, you need to get the Gaim libnotify package. I’m assuming here that you’ve built packages before; if not, you’ll need to install build-essential from Synaptic (or with sudo aptitude install build-essential in a terminal).

Create a temporary folder to do the build in (Places > Home Folder, then right-click in your home folder window and say Create Folder, and call the new folder tmp).

In a terminal (Applications > Accessories > Terminal), change into your created temporary folder

cd tmp

and install first the things you need to build the package

sudo aptitude install libnotify-dev gaim-dev fakeroot cdbs

(you could also install those three packages from Synaptic if you prefer), and then fetch and automatically build the gaim libnotify package

fakeroot apt-get --build source gaim-libnotify

That will take a little while. Once it’s finished, go back to your Home Folder window and look in the tmp temporary folder you created. There should be a file called gaim-libnotify_0.12-1_i386.deb

Run that file. The Package Installer window will pop up; click Install Package. This will install the new notifications (it may ask for your password to do the installation).

Now, you need to enable the plugin. If Gaim isn’t running, run it (Applications > Internet > Gaim Internet Messenger), and right-click on its notification-area icon; choose Plugins:

In the Plugins window, tick Libnotify popups. Remember to untick Guifications if you were using it before! Close the Plugins window. I then had to quit Gaim (right-click the notification-area icon, Quit) and restart it before the new notifications worked properly. But, lo and behold, nice pretty notifications when someone logs in!

Christian Heilmann sends me a message
Tiny Matt Revell signs off

WebKit browser on Linux

Update: the trivial WebKit browser is now included in Ubuntu. Simply install libwebkitgdk0d on Ubuntu gutsy (just click the package name there to install it if you’re running gutsy now) and then run /usr/lib/WebKit/GdkLauncher to get a simple WebKit browser for testing your code.

You too can test WebKit, Apple’s web rendering engine and the thing that makes Safari work, on Linux. The KDE teams have been working hard on making it work inside Qt, the KDE widget set, and indeed it does work! A few simple steps are required.

First, check out the WebKit source code. There is loads of it, so this will take a while. You’ll need Subversion for this.

svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit

That will give you a folder called WebKit. You’ll now need a few requirements; the key one is Qt4. On Ubuntu 6.10 (edgy), get this like so:

sudo aptitude install libqt4-dev

Now build your Qt-based WebKit browser:

QTDIR=/usr/share/qt4/ WebKit/WebKitTools/Scripts/build-webkit

Finally, run it:

WebKit/WebKitBuild/Release/WebKitQt/QtLauncher/QtLauncher about:blank

I created a menu entry to run it (right-click on the Applications menu, say “Edit Menus”). Now I can test stuff in WebKit!

Note that the Subversion version of WebKit is miiiiiiiiles ahead of what Safari is using in released versions of Mac OS X, so don’t think that just because something works in your little WebKit browser it’ll work in Safari. Nonetheless, cool.

IEs4Linux

Testing web stuff in Internet Explorer is an unfortunate necessity. It’s a lot easier if you go get IEs4Linux, which with one command installs IE5, IE5.5, and IE6 on Linux using Wine. Nice.

The latest beta version is easier to install (graphical rather than command-line) and also installs IE7 (in a rather hacked weird way); when it goes stable I shall be using it!

Good work Sérgio Luís Lopes Júnior!

Sorttable v2: making your tables even more sortable

Sorttable, the JavaScript table sorting library, is pretty much the most popular thing I’ve ever written. (Top hit for “javascript sort table” on Google, too.) Over the four years or so since I first released it, there’s been a steady trickle of thanks, feature requests, and bug fixes to it. I’ve finally got around to releasing a new version of the script that hopefully covers everything that people were looking for. You can get it at the same place as it ever was, sorttable: Make all your tables sortable.

What’s changed in version 2

The most important thing that’s changed is that sorttable now has a much much clever automatic column typer. You still can just drop sorttable in place and not have to do any configuration, but it’s quite a bit cleverer about working out whether your columns are numeric or dates or currency or text. It skips blank lines, it can tell the difference between English and American format dates, it understands numbers with commas in and negative numbers. This is the number one feature request.

Secondly, you can now use custom sort keys for those columns that sorttable can’t work out for itself. See the page for details, but this should allow anyone to make anything work with sorttable v2.

It’s also a bit more compliant with HTML standards. To add a “totals” row you should add the row to a <tfoot> section in your table. Sorttable v1 used a class of “sortbottom” on totals rows; for backwards compatibility this is still supported, but you really should be using <tfoot> instead.

In a similar way, sorttable now uses <thead> as your column headers if you have it. If you do not have it then it will create a <thead> and put the first row of your table in it. This is a backwards incompatible change: to apply style to your table headers, you should now style table.sortable thead, not table.sortable a.sortheader as in v1.

Input elements are now supported in table cells! If your table cells contain input elements then sorttable will use the value in the input element.

Sorttable is now quite a lot faster than it used to be, owing to various little tweaks. It’s especially fast at resorting the table by the column you’ve already sorted by (but reversed), because now it just reverses the table rather than doing the sort.

Stable sorting is supported but commented out in the code (because the stable sort is implemented in JavaScript, not using the native list sorter, and so it’s a lot slower). You can change this by editing one line in sorttable.js if stable sorting is important; see the page for details.

Thanks

Lots of people (really, really lots) have contributed code suggestions, feature requests, bug reports, and compliments about sorttable. Here’s my chance to say thankyou. So: thankyou to…

Eric Chang, Mehmet Kut, Dan Synder, Jeff Bradley, Eric Holstege, Victor Kryukov, Nikola Ivanov, Geoff Clevenger, Mikko Suniala, Scott Reynen, Justin Meyer, Leonardo Kenji Shikida, Ben Ostrowsky, Daniel Berlin, Richard Snazell, Mark James, Eric Rizzo, Garve, Andreas Rehm, Scott Kingdon, Marcus Månsson, Bill Barry, Michael Rumpler, Avi Rogers, Kevin Wu, Espen Hovlands, Petronel Laviniu Malutan, John M. Pierre, opus27, Brendan Bowles, Marty O’Brien, Alex Rubin, Chris Gay, Jack Vanhan, Guy Rosen, John Dawson, Ryan Korczykowski, Carl Forde, Pete K, Glenn Haser, Richard Grassy, Olivier Briat, Bob Hanson, Alex Z, Narayana Rao Kankipati, Rey Hernandez, Eric Moriztz, Marco Valk, Marcus Daniel, David Dockhorn, Angela Weise, Aneel Nazareth, Jeremy Hulford, Thomas K. Weinstock, Edward, Matthew Egbers, Anton Berezin, Moustafa Elqabbany, Justin Williams, Daniel Chace, Inigo Surguy, Vladimir Kornea, John Mund, Pablo, David Golden, Brad Kemper, Brian Schott, Christian Robottom Reis, Justin Haygood, C. David Eagle, Simon Willison, and Dean Edwards.

Phew! All those people have contacted me asking for new features or have sent me patches or have provided code that I was able to reuse in v2 of sorttable. Thankyou: for those of you who wanted sorttable to do something new, I hope you like it.

LugRadio Live 2007 Call for Papers closed

Get all your LugRadio Live news and updates from the LugRadio Live Latest News Blog!

OK, we’ve now closed the Call for Papers for LugRadio Live 2007, so if you wanted to get a talk in but didn’t get around to it you’ve missed your chance! We’ve had loads of great talks submitted, and we’ll be putting the schedule together and contacting everyone shortly. Thanks to everyone who submitted!

If you wanted to do something but didn’t get a chance, or you missed the cut this time round, you might be interested in running a BoF session on your chosen subject. We’re really interested in having some superb BoFs this year, so please contact us to let us know!