In with the new, out with the old

So, I done bought me a new laptop. It'll be a bit of a struggle to afford, but I do need a new one; my beloved old Sony C1XD has served me well for the last five years but it's really just too slow to use seriously any more. I considered upgrading the RAM and hard disk on it and getting a new battery, but by the time I do that, I may as well get a new system. The new laptop will actually be faster than my current desktop, so I'll use it as my main system, give this desktop to my partner, and use his old desktop as a dedicated server. My old laptop is now for sale; it's a fantastic system, I still love the form factor and the build quality, just a bit too slow to use as a main system or even a main laptop any more. I know there's a lot of Picturebook enthusiasts out there, though, so I should get a decent price for it.

/backports is open for business

In news that I can't quite figure out where to report, it's nice to note that we opened the /backports media for 2007 /main and /contrib today. (Also opened were /contrib/testing and /contrib/updates ). This means there's finally a simple way for packagers to build and users to get backported packages for stable releases, where the maintainers want to do them. Quite a lot of maintainers are interested in using this system, and I've already heard of plans to backport beryl, so this should be fun. We still need to sort out the rather messy tangle of overlapping repositories that can potentially be used for backports to stable releases (/backports, Kiosk, Club RPMs Farm, "Club software" urpmi media...did I miss any, kids?), we'll probably nuke some and draw clear demarcation lines between the rest, but for now /backports is basically open to all maintainers with the same restrictions as Cooker, and we're asking that no-one backport anything really big and important like KDE or Firefox for now, while we decide what the policy's going to be on that.

Having /contrib/updates is also great news. Now if only someone would upload a package to it so the empty hdlist doesn't break edit-urpm-sources's Add... button anymore.


So I did it - set up a Flickr account, that is. Photos will live there from now on, until they turn evil and attempt to take over the world. Ah, outsourcing...I feel evil.

Contacts server?

Lazyweb, O lazyweb. I was struck today by the notion it would be quite neat to share my address book between Evolution running on my desktop, Evolution running on my laptop, and the roundcube webmail system.

A bit of basic Googling suggests I could probably do this via OpenLDAP, but it looks like using a nuclear bomb to crack a nut. Is there a more modest server in tune with my modest aims? Or is it really, really easy to set up OpenLDAP for just such a basic requirement?

VMware time loss and Mandriva

Here's a little thing I came across while doing my new mail / web server setup. After I got both servers up and running I realised they were suffering from a problem I'd noticed before with VMware machines I'd run but which had never really been a major issue: their clocks lost time rapidly, about half an hour every hour. When you're just testing out Ubuntu or something that's not a major problem, but on a machine I intended to be my production server, obviously it was. I read a bunch of documentation on the VMware site and apparently the most common cause of this problem is to do with the kernel timer. VMware say that most distros configure the kernel timer at 1000Hz, so when you install a Linux client it wants 1000 timer updates per second and VMware has trouble providing this from the host. Their recommended fix is to recompile the kernel with the timer configured at 100Hz.

I checked the Mandriva kernel sources and determined it's actually built with a 100Hz default. Me being an idiot, this stymied me for a few hours.

Then I realised the obvious answer - if the Mandriva kernel is configured at 100Hz, that means my host is also only providing 100 timer updates per second, because it's running the Mandriva kernel too. What VMware's advice really means is that you want the host to run a 1000Hz timer and the guest to run a 100Hz timer.

So all I needed was a kernel with a 1000Hz timer to run on the host. Now I could have rebuilt the stock MDV kernel with the timer set to 1000Hz, but I'm criminally lazy and get good intuitive ideas sometimes, so I thought 'I just bet that kernel-multimedia is configured with a 1000Hz timer'. And sure enough, it is. Using kernel-multimedia on the host and stock kernel on the guests, the clocks stay in sync pretty well (and I sync the guests via ntp every hour to make sure they're never more than a couple of seconds out). Problem solved.

So, if you're running Mandriva VMware clients on a Mandriva machine, use kernel-multimedia on the host and stock kernel on the guests to alleviate your clock woes. Or if you don't want to go with an unsupported kernel, rebuild the stock kernel with the timer at 1000Hz to use as the host's kernel.


So I successfully migrated the web server to a virtual machine today. Unfortunately I'm going to make the Gallery a casualty of the /home wipeout and the move; all Gallery's actual data was stored in /home. I still have all the original pictures, they were stored elsewhere, but I just don't feel like recreating everything for no real benefit; I'm going to move over to using Flickr like the rest of the world. So from now on this site will publicly host just the blog. I'll throw up a link to my Flickr page once I upload stuff there.



I nuked my /home partition.


I was trying to resize it and move a bunch of stuff to a dedicated new partition, in order to make backing up /home easier. Only I forgot that shrinking reiserfs partitions just doesn't really work. And I also was in a bit too much of a hurry to take a backup before I did this thing that was supposed to make taking backups easier.

So the upshot is that all I have left of my /home partition (y'know, five years worth of email, about ten years worth of 'Documents', including immigration related stuff, work stuff, and all my old school papers...) is a /home/lost+found containing about 1.5GB of cryptically named files that I really don't have the energy to sort through.

Ah, well. View it as a bit of spring cleaning.

I took the opportunity to re-implement my web and mail servers; instead of everything running directly on my desktop, they'll now be VMware virtual machines. I've moved the mail server over already and I'll do the webserver tomorrow. It's working out very nicely so far, actually - I managed to do a very nice minimal install of 2007 (only about 600MB big, boots to a console in under a minute inside VMware and uses about 40MB of RAM sitting idle, 65MB actually serving mail), and got everything set up and working again pretty quickly. So now I can at least get at my new mails. This way of doing things will make it much easier to back up the mail and web servers, and also to move them around and other fun stuff like that. The web server might be a bit more complicated to migrate, but I should be able to get it done over the weekend.

Oh, well. It keeps me busy...

Shiny webmail

I have a very old-school mail setup. I have several mail accounts with various providers, all of which still get mail and which I can't merge into one account very easily. I used to use Evolution on my desktop to access all these accounts directly. If I wanted to read mail on my laptop I'd hope that running Evo on the desktop over SSH would work. When I wanted to read mail from anywhere else I'd have to log in to each provider's own webmail system, which takes ages, is horrible to use, and doesn't update the read / unread / replied-to status on Evo at home.

This sucked.

So I changed it all. Now I basically have my own mail server. It runs on my desktop, which isn't ideal, but I plan to shift it to a virtual machine or a real dedicated server sometime soon. Anyway, it runs fetchmail to pull in all the email from the various accounts. All the mail is then piped through procmail, which filters it for spam with spamassassin and then sorts it into various maildir-format folders under ~/Maildir. courier-imap then serves out the mail from these folders. I can then use any IMAP-compliant mail reader on any machine on my local network to read the mail; whatever client I use to read it with, the message status stays perfectly in sync, because all that is handled by the IMAP server, not the mail client.

The only issue then is external access. Sometimes I allow the server to be accessed externally (I stop restricting access to only 192.168.1.* addresses, and forward the imap-ssl port through my firewall). Then I can use an IMAP client on any external machine just as I can on any internal machine. Sometimes I get a bit worried about the security of such a setup, though, particularly as it runs on my desktop. Also, sometimes I'm using someone else's machine and don't want to start installing and configuring a dedicated email client, and sometimes I'm in a situation where I just flat out can't do that. So I've also been running squirrelmail, which is basically a webmail server. It runs on the same machine as the mailserver, connects to the IMAP server (well actually I have it going via imapproxy, but that's just for reasons of speed) and then provides webmail access via Apache (yes, that does mean I have a web server running on my desktop too; security enthusiasts in the audience, feel free to drop dead of a heart attack at this point).

This works fine, except for three problems. It's a bit slow. The interface isn't very good. And it's ugly as sin. Take a look at the screenshot. Would you want to be caught dead using that in public instead of gmail? Nope, me either.

Fortunately I stumbled across something nicer yesterday. A Club forum regular mentioned something called Roundcube, so I went to investigate. It's a webmail server just like squirrelmail...only it's implemented in a much more modern way, and consequently looks a hell of a lot prettier and has a much nicer interface (it feels very like a 'proper' mail client, rather than a web page). See?

Only problem is that the stuff roundcube uses is so new it won't work properly on some older browsers (especially IE <6.0, and to a lesser extent, even IE 6.0). So I still keep Squirrelmail installed in case I happen to be using a machine crippled with an old Microsoft browser. But in all other cases, Roundcube rules the roost now. It'll be even nicer when it has GPG support and a preview pane, but it's already pretty killer.

Audio part 2

So an update to my previous post on audio: I found the patch in Banshee bugzilla that enables transcoding support. Applied it to 0.11.0 and rebuilt, and it works pretty nicely: I can drag files from my library to my phone, then synchronise the phone, and they're transcoded to MP3 and copied to the phone as they should be. Very nice! It'll be awesome when this is merged into a stable Banshee release. Now if only it could somehow write playlists as well, in the weird-ass .apl format Motorola chose to use for some reason...


I want my audio players to work in GNOME.

This is a re-written version of this post, after some research :). It seems really, really NEARLY all the bits are there. HAL can recognise music players, and it can specify what directory song files should go into, and what format they should be in. Banshee recognises music players and respects the song file directory setting. The only thing it doesn't do is transcode to an appropriate format, so if I drag and drop a song from my library that happens to be a Vorbis file to my phone, it just copies the .ogg file to the correct directory on the phone, even though the HAL entry I wrote for the phone specifies it can only support MP3 and WAV.

Rhythmbox doesn't seem to have write support for mass audio devices (in 0.9.5, I didn't get around to trying 0.9.6 yet), but I'm sure it can't be far behind.

Banshee respecting the supported file types exported by HAL is all we need for this to rock: come on guys! Then they can start writing support for players that use databases (besides the Ipod and the Creative players, which are already supported), but we're very close to having working mass storage player support.

I submitted a patch for HAL which adds support for the Motorola V360 and specifies the correct audio directories for the V360 and also for the Playstation Portable and Sony Ericsson W800i. When I (hopefully) get a W810i soon, I'll be submitting a patch for that too. It's quite easy to make a patch for /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi to add support for any mass storage device that can play audio - this guide mostly covers it, the only thing that needs to be added is a line like this:


It goes under the keys that specify the supported file formats, and it tells the system where audio files should go on the device. That's the line for my V360 phone, it tells the system to put audio files in the /mobile/audio directory on the device. Modify as appropriate for your device. If you have some kind of USB storage device that can play audio - a phone, a music player, whatever - and isn't currently recognised as an audio player by GNOME, write a patch! It's pretty easy and very easy to test (just restart HAL, plug the device in, and make sure it pops up on the desktop with the audio player icon instead of the generic external drive icon. To test the audio path setting, drag a song to the phone in Banshee, and see whether it goes to the right place.) Submit it to the HAL Bugzilla and help make things work a little better for everyone :) Now if Banshee will just learn to transcode, things will rock indeed.