Face to face with Karmic Koala

October 10, 2009

One thing that does irritate the heck out of me with the new Karmic Koala release of Ubuntu is the new “face greeter” that Gnome have introduced with version 2.28. This shows up when you boot your system as a list of users that you might like to login as, with a customisable icon next to each. You then have to click on one of these entries with your mouse before an input field opens up for you to enter your password into, allowing you to login.

Although the screens are pretty, it’s nowhere near as convenient or as fast as being presented with an input field into which you just type your userid and then your password. It’s also almost identical to the login process that Windows XP introduced a few years back, which I always felt (perhaps uncharitably) was designed for people who couldn’t remember their userid, and needed a little picture instead.

Anyway, me being me, I want my login process back the way it was thank you.

However, the GUI that Gnome have provided to customise the login screen is somewhat deficient in this area, despite a bug report asking for some improvements. You can either have the “face greeter”, or you can select a userid to be logged in automatically without any user interaction (optionally after some time-delay). And that’s it.

Fortunately they provide a command line tool which allows you to customise many, many characteristics of the Gnome environment, called gconftool-2. And after some digging around it turns out that there are some settings related to the login panel (also known internally within Gnome as “gdm”) which can be adjusted using this tool, including one setting which disables the new “face greeter”. So if you, like me, don’t like this new behaviour, simply open up a terminal and type (on a single line) :

sudo -u gdm gconftool-2 --type bool --set /apps/gdm/simple-greeter/disable_user_list 'true'

The result still isn’t exactly the same as it used to be, as the login screen now comes up with a single button, labelled “Log In”, which you must click before being given the old, familiar password/userid entry field. Which is also deeply annoying, as this breaks a fundamental of user interface design, namely why ask the user to press a button when there are no other options available? Just take them to the next decision point in the process. Fortunately, a bug has been opened against Gnome to fix this, so hopefully we will see it resolved, but whether it will be in time for the final release of Karmic Koala Ubuntu is another matter entirely.


Archiving data files to DVD

September 20, 2009

IBM has been using Lotus Notes as its email platform for the last 14 years or so, and during those years I’ve seen the size of emails increasing dramatically, mostly due to the ease with which people can attach large (and often unnecessary) attachments. IBM meanwhile would like us to minimise the size of our mail databases to minimise the cost of storing all this email across the corporation. However, at the same time, keeping many of these emails so they can be referred back to is very useful. Consequently I’ve been archiving all my email from my mail database to my local mail archive database. Unfortunately, the larger that database has become, the slower it becomes for certain classes of operation, such as opening or searching it. The actual file that represents that database also starts to become very unwieldy for the operating system; my email archive database was nearing 6GB in size.

I recently decided to do something about it, and split that single large mail archive database into a series of smaller archives, each covering a two year period, limiting the size of each to a GB or less.

I currently back these up to my NAS, but I’d like to have extra copies somewhere less accident-prone than spinning media. A couple of sets of DVD’s, preferably stored “offsite” from where my NAS and laptop are kept (ie, at work, not at home) seems like a good extra insurance policy. Which leads me to the question of how to burn some very large files to DVD under Linux.

It turns out that Ubuntu comes with dvd+rw-tools already installed, which provides command line utilities to do everything that is required.

dvd+rw-format -force /dev/dvdrw Formats the DVD-RW, allowing it to be used. Doing this too often can seriously shorten the life of your DVD-RW media, and it isn’t necessary to format before each reuse – just overwrite the old contents with new data.

growisofs -Z /dev/dvdrw -R -J /etc/*.conf Initialises and writes an initial set of files to the DVD-RW. If there is already data on your DVD-RW, this will overwrite it.

growisofs -M /dev/dvdrw -R -J /var/log/*.log Adds some more files to the DVD-RW. On a DVD-R I believe this will create another session, and write the data into that.

Note that with DVD-R media you skip the formatting step, then use the same growisofs commands as with DVD-RW media, EXCEPT it appears that you can’t easily add files to an existing DVD-R without creating a multisession DVD-R, which looks like it could be a heap of pain. I figure it’s probably best to just save all the required files in a single write.

For maximum compatibility, close the DVD-RW off with growisofs -M /dev/dvdrw=/dev/zero once all the files have been written to it, and just for completeness, it’s possible to get detailed technical information on the contents of any optical disc, by using the command dvd+rw-mediainfo /dev/dvdrw

Note that in all cases, these commands must be run by a “normal” (non-root, non-sudo) user, and the DVD media must be unmounted at the time.


Mobile broadband on Karmic Koala Alpha 6

September 18, 2009

Today I decided to try out the latest code drop for the next release of Ubuntu. This will be released as Ubuntu 9.10 next month, under the codename Karmic Koala. There are some rough edges, but so far I am extremely impressed. This release has moved to some very new technologies, and yet even at this early stage almost everything is basically working.

Under the current version of Ubuntu getting my USB mobile broadband modem (a ZTE MF627) working was quite awkward. It required quite a lot of configuration work, and the installation of some additional programs. Whereas under this newer version it is almost (but not quite) working out of the box. One simple configuration file needs to be added, called /etc/udev/rules.d/ZTE.rules, containing the single line:

SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="2000", RUN+="/usr/bin/eject %k", OPTIONS+="last_rule"

Once the system has been rebooted (or udev restarted), inserting the USB modem causes the udev system to automatically detect it, and switch it to the correct mode, at which point Network Manager recognises the broadband modem becoming available, and allows you to configure it with your provider details. From then on you can connect by simply selecting the mobile broadband connection in Network Manager.

All very simple. As it should be.


Things are on the up?

June 16, 2009

Yesterday was a very bad day indeed. I woke up feeling ill, and that feeling just got steadily worse through the morning until I had to give up and go back to bed again. I’m not even sure I know what the problem was, but I suspect a combination of tiredness, dehydration and the heat of what turned out to be a gloriously sunny day finally caught up with me. In the end, the cause made no difference – the result was the same. I was only out of bed long enough to take my medicines and eat breakfast, lunch and tea. Which for me is nothing short of staggering. I’m typically a night owl, and happily get by on 5 or 6 hours sleep a night. Whereas yesterday I got by on only 5 or 6 hours of wakefulness.

Fortunately, today was a lot better. I woke up early (hard not to after so much sleep!) had breakfast, decided I was feeling much better, and tried to decide whether I was going to try to do something special with the day or not. In the end the decision was taken from me, as my new Acer Aspire One (the second I’ve bought) turned up before I’d managed to make any decision. And so I suddenly had a task to achieve – to get it set up for my daughter. Since I needed to add more memory to it, this involved a trip to the local computer hardware store in Fareham, the disassembly and reassembly of the machine (to fit the memory), and the installation of both Windows XP and Ubuntu UNR on it, plus some configuration to make it play nicely on our home network. Quite enough for one days efforts.

It’s not clear if having a target for the day made any difference or not, but apart from feeling incredibly thirsty all day, I’ve felt fine, kept busy, and achieved some stuff. I’ve also drunk my way through 2 litres of bottled water, plus some tea and coffee (so far) and would really fancy a pint of bitter about now, if only I didn’t know for certain that it would have repercussions later.

Meanwhile my various other side-effects seem to have sunk into relative obscurity; the only thing that niggled at me (that I particularly remember anyway) was a touch of the peripheral neuropathy which caught me by surprise while I was trying to fight the ground coffee back into the freezer again.

So, after the last few days I declare today to be a massive success, and if it holds until tomorrow then I’m going to plan on going for another cycle ride and work on building some more stamina.


Recovering recordings from dead Pace Twinview PVR

June 6, 2009

A couple of years ago the kids discovered the benefits of our PVR, and suddenly (a) there was no space on the PVR, and (b) we could never find anything we recorded amongst the zillions of recordings of CBeebies, CBBC and CITV. And then we inherited an old Pace Twinview PVR from my father-in-law, who had traded up to a Humax 9200. So I set it up for the kids on “their” TV. This meant that they could record whatever they wanted, without filling up the PVR in the lounge. And for a fair time, life was good.

And then the Twinview started playing up, and eventually died. And suddenly I have three kids who want me to recover all the recordings that they’ve been making.

No problem I think – those recordings are probably just recorded directly off air as transport streams (.ts files) which I can easily transform (using ffmpeg) either into something like H264 video and MP3 in an mp4 container, which they can then watch on the PS3, or an MPEG2 file which I can then make into a standard DVD. So I say not to worry, I’ll fix it for them.

Which was hasty. Very hasty. And possibly a big mistake.

So I extract the hard drive from the PVR. Good news, it’s a simple 20GB PATA laptop drive which will fit nicely into my Thinkpad ultrabay. So I boot up Ubuntu, and do a quick “fdisk -l /dev/sdb” to discover that there are three partitions, all of which are unrecognised by fdisk. They are however flagged with partition identifier 0xE0, which after a bit of Googling turns out to be a completely proprietary filesystem, designed by ST microelectronics, called ST AVFS – presumably the ST Microelectronics Audio Visual FileSystem.

So currently I’m struggling to find a way to get at the data. It’s not possible to just mount the partitions, but it turns out that there has been some work done on some linux command line tools (TwinRIP) to extract the data from those partitions. However, the tools are at least two years out of date, supplied in binary form only, and no longer run under any of my Ubuntu installs (lots of problems with missing libraries). Now, it transpires that there is a GUI program to do much the same under Windows (TDU), which looks to be more recently updated, and (plus point) can directly produce MPEG output files. It will be interesting to see if that runs under Windows 7 RC, which is the only Windows install I currently have on my Thinkpad!

Update: And the results are in. The TDU program doesn’t work any better than the Linux one. And Windows 7 doesn’t want to talk (reliably) to the hard drive, whether mounted using my Thinkpad ultrabay, or a USB caddy. Worse, the author of TDU & TwinRIP has not published any source code, so there’s no chance of my doing anything geeky at this point, so I’ve declared defeat, and told the kids that their old recordings are now officially lost :(

The only upside is that this gives me another free 20GB PATA laptop drive to play with, if only I can think of a use for something so small.


Tuesday spent “tinkering”

April 22, 2009

Yesterday I decided it was time to work out exactly what is going on with my home server. This was one of those little jobs that I’d decided wouldn’t require much physical effort, and that could be picked up and put down again as required when I felt tired. In short, ideal for my current situation.

The main problem is that I have three large SATA drives in the server, that I want to run as a RAID 5 array, but the motherboard I am using (in common with almost all other mini-itx motherboards) only supports two SATA drives. Originally I tried to work around this by using a PATA to SATA converter, but found that it resulted in some odd errors and what appeared to be data loss. So I bought a PCI card with a pair of SATA ports, based around the SiL3124 chipset, to provide me with support for a total of four SATA drives. However, any drive connected to that PCI card started showing errors whenever the I/O rate went above some arbitrary level, making it completely unsuitable for inclusion in a RAID array.

So yesterday I replaced the SiL3124 PCI card with another based on the VIA VT6421, which provides 3 x SATA ports and an IDE port, and since I had the server in pieces, took the opportunity to add an IDE to Compact Flash adapter, along with an 8GB Compact Flash card.

My intention was to be able to install the operating system onto the Compact Flash card, and then use the 3 x SATA drives purely as a RAID 5 array for data storage. By installing the operating system onto the memory card (with no moving parts that wear out) I would minimise the chance of any failures, making the system more reliable. The RAID 5 array would provide redundancy for my data storage, allowing a drive to fail without impacting my data.

However, in the tradition of plans laid by mice and men, when I got everything updated, the drive connected to the new PCI card still exhibits strange I/O errors. And swapping the drives around still leads to errors only from the drive connected to the PCI card. Which leaves me with the frustrating conclusion that it’s probably something to do with the implementation of the PCI bus on the motherboard – which is not what I was hoping for.

This somewhat Frankensteinian server has worked well for the last couple of years, but I’m starting to think that given how much of my home now depends on it working smoothly, it may be sensible to actually buy a new server designed specifically for the task, rather than wasting precious time chasing down obscure hardware issues in my DIY creation. At the moment, this one looks just about perfect (apart from the price … gulp …) would allow me to reuse my existing drives, and can probably even be made to boot from my compact flash card still. Decisions, decisions!


Internet TV

March 9, 2009

A colleague pointed me at get_iplayer the other day, and I spent a couple of hours this weekend playing with it. Without a doubt it is the easiest way I have come across for getting hold of content from the various UK “play it again” services for TV and Radio.

BBC TV programme downloads are in H264 video and AAC audio, and although they are not high definition – more like good VHS quality – the convenience is spectacular. I sucked down a couple of programmes from the BBC; an episode of Being Human, and an episode of Doctor Who, which took about 15 minutes each (on my current 2Mbit connection). Both were downloaded as Quicktime .mov files because the feed that get_iplayer uses is designed for the iPhone.

I then converted them to .mp4 containers (using the command ffmpeg -i input.mov -vcodec copy -acodec copy output.mp4) and stored them on my NAS. From there, they were streamed (using the Mediatomb DNLA server) to my PS3 over my wireless network, which was able to play them back onto my flatscreen TV. And it worked beautifully.

Except for the stuttering. And the occasional unexpected pause. Turns out that despite my PS3 seeing 85% WiFi signal strength, it can’t consistently transfer more than about 0.5Mbit/s over my home wireless network. Which is not enough for video streaming. A quick check with a long Cat5e cable shows no signs of stuttering or pausing, so this is clearly a problem with the wireless drivers in the PS3. So it looks like I will need to hurry along my plan to drop some more ethernet lines to the back of the TV area of the lounge. Except of course, that isn’t going to happen for a few months now :)

However, notwithstanding the networking issues, the potential here is great. I can write some webpages on my NAS that I can access from my PS3, on the flatscreen TV in the lounge. That will run get_iplayer and return a list of available programmes, which I can select to download and have stored on my NAS, where they will then be converted to .mp4 format which I can stream to the PS3, so I can watch them. When my fast connection comes online (hopefully tomorrow!) that should take no more than 2 or 3 minutes for an hour-long TV programme.

Internet TV … almost on demand.


Living on the bleeding edge

February 23, 2009

As detailed in an earlier post, my Acer Aspire One has been doing a sterling job, replacing my larger, more powerful, but MUCH less portable Thinkpad.

And it occurred to me that the One might well be the ideal machine to take into hospital with me so I can listen to my entire music collection. And then I thought how it would be nice to also be able to listen to the radio. Or watch TV. And I remembered that Hauppauge make really good USB digital TV tuners, which can also receive radio. It was too much for a geek to resist, so a day later I was the proud owner of a Hauppauge Nova-T USB2 stick.

Only to discover that the highly optimised pre-compiled custom kernel that I was running (to keep the performance high) on the One lacked any support for TV tuners. Ooops. So all I need to do is produce a new kernel thats as efficient as my current one, but includes support for the TV tuner.

The last time I tried to compile a linux kernel was back in the days of SUSE 7, and I failed. Big time. So big time that I managed to also destroy the machine I was trying to compile the kernel on. I’ve avoided compiling my own kernels ever since. But hey, time heals all wounds … I’m smarter now, and much more linux-savvy. How hard can it be?

And the answer is, it’s a complete breeze. I plugged in all my hardware, and ran autokernconf, which worked out what kernel options I needed for my current hardware. I then merged it with the kernel config from my pre-compiled kernel, and sorted and uniq’ed it. A little bit of tweaking, and some judicious use of “meld” to check my new config against the original, and then I then downloaded the latest 2.6.28-7 kernel source, imported my kernel config, brought it up to date with newer config options, and ran the compile. All in my own home directory, without the need for root, or messing about in /usr/src. And the output was a pair of .debs that could be easily installed on any machine with next to no effort.

The physical process is about 10 minutes for the minimal kernel I created. Of course, working out exactly which options to select/deselect can take longer. A lot longer. But overall, I am deeply impressed with the effort that has been put into making compiling the kernel both a simple, and more importantly, safe job, with little to no risk of damaging the existing installation.

Oh yes, and now my TV tuner works just fine under Kaffeine :)


Smaller is better?

February 8, 2009

Work provide me with a laptop for business, changing them every three years or so. I’ve had a succession of IBM Thinkpads, which I have to say are truly the Rolls-Royce of laptops. Relatively compact and portable, stuffed with features and the kind of build quality that allows them to survive years of abuse (mine have travelled all over the world with me). My experiences with them have been exemplary … until the last few years, when IBM sold the Thinkpad business off to Lenovo. The last couple of machines have not been so great. My top of the range T40p needed 3 motherboards in as many years. My current T60p has already had 2 motherboards, a fan and a heatsink assembly in two years. And now the screen (a rather nice 15″ 1600×1200 job) is showing lines of dead pixels that probably indicate either the LVDS connector is failing, or I need yet another new motherboard. In addition Thinkpads seem to have been steadily growing. My last two machines have not fitted into my “old faithful” laptop bag, requiring a bigger heavier bag to carry them in.

So recently I found myself wondering why I needed a machine with 2 x 2.16GHz processors, 2GB of ram, and a 1600×1200 pixel 15″ screen. Fundamentally I do the same stuff on this machine that I did on my old Thinkpad 600 some 10 years ago. I do email. I browse the web. I use IM. I follow some (real NNTP!) newsgroups. I create documents and I read documents. I do presentations. I occasionally print stuff. So why do I now need the above monster specification, when I used to get by on a single 300Mhz processor, with 384MB of ram, and a 1024×768 13″ screen? And the more I thought about it, the less I could understand it. All I’ve done is adopt a much bigger and heavier machine, that runs a lot hotter, to do the same stuff. The bigger machine isn’t actually allowing me to do anything faster … I still think at the same speed. In fact, in one area my performance has actually decreased – I actually walk a lot slower with it because it weighs so much.

So at Christmas I decided to have my own personal “grand challenge” – to see how small a machine I could get away with to do my job. So I went out and bought my first ever laptop – an Acer Aspire One “netbook”. I got the one with 512MB of ram, and a 120GB hard drive. Cost me 200GBP here in the UK (I know, they’re a LOT cheaper in the USA – we get screwed on computer stuff here).

A day playing with the preloaded Linpus Lite linux (aka hacked Fedora 6) convinced me that while it was set up to be a foolproof computing appliance for the computer-illiterate, I needed something fuller-functioned. So after a little bit of fiddling with gparted, I now have the Aspire set up to triple boot any of (a) the original Linpus Lite, (b) Windows XP SP3 and (c) Ubuntu 8.10. Ubuntu will be my OS of choice, with Windows there purely for the odd work application that I have to use that isn’t supported under Linux. I kept Linpus purely to compare my performance tuning of Ubuntu to the stock preload.

To Ubuntu I added Thunderbird, Lotus Notes and Sametime (our corporate-standard groupware) and some VPN software. I then added OpenProj, Freemind and Dia, and upgraded the OpenOffice install to v3.0. And to my astonishment, in the last month I’ve needed nothing else.

There have been some teething problems though.

The first problem I experienced was that on Linux, Lotus Notes is implemented as an eclipse plugin, so unfortunately by the time it’s loaded there’s very little left of the 512MB of ram. I gave up after a couple of days, and sprang for another 1GB of ram, at another 13 GBP. Installing it required the complete disassembly of the Aspire … but in actual fact only took about 20 minutes with a set of jewellers screwdrivers. This maxes-out the memory on the Aspire One (at 1.5GB), but I now seem to have memory to burn, even when I have all my applications open at once.

The second problem is that as a long-term thinkpad user, I’m used to having a trackpoint (the little red “nipple” embedded in the keyboard) for moving the cursor. Compared to the control that that provides, a trackpad is a hopelessly painful experience. Fortunately I already had a Logitech bluetooth mouse (a V470), but unfortunately the Aspire One doesn’t come with internal bluetooth. So I had to add an external USB bluetooth adaptor. I imported a USB Bluetooth 2.0 EDR micro-stick from Hong Kong for 6 USD which resolved that problem, and is actually small enough to be left permanently attached, though longer term I’ll probably solder the internals of one to the motherboard somewhere.

Other than that, it’s proving a remarkably solid little performer. The keyboard is a little cramped, but just about big enough to almost-touch-type on. The screen is painfully small, but with multiple workspaces and compiz-fusion doing its thing, you can work around that. And I have external monitors at home and at the office, so it’s only really a problem while travelling anyway. If I have a lot of stuff going on then some applications can be a little sluggish, but even then it’s not problematic … just noticeable.

Boot times for standard Ubuntu were very slow compared to the preloaded Linpus lite, but a custom kernel tailored to the Aspire One has got that down to about 25 seconds, which is faster than standard Ubuntu boots on my T60p. Still not as fast as Linpus though – which is up in about 15 seconds. Battery life on the standard 3 cell battery is only about 2:20; a high capacity 6 cell 3rd party battery should take that to about 7 hours but for my working patterns that’s unnecessary, and would start to add to the weight and size again.

Which leads us to the question of do I declare the challenge beaten or not? I’d justified buying the Aspire One on the basis that if I couldn’t live with it, I’d simply give it to one of my daughters, as I figured it would be fine as a first machine for school-work etc. Well, at the moment I’m not prepared to give it up. It does everything that I need – just, and no more. In fact, these Aspire Ones would be great for my daughters, and the only thing holding me back from going out and buying them a pair is the faint hope that we may see some netbooks built around NVidias ION platform this year.

Replacing the Intel 945GSE chipset (which seems to be based on 3-4 year old designs) with the NVidia GeForce9400 chipset ought to result in a stupendous graphical performance hike for no increase in power consumption. The only question is, will anyone do it? The problem is that it makes low-end netbooks compete with mid-range laptops (problematic for the manufacturers), and Intel is sure to price the Atom/945 combination in such a way that its almost as cheap to take the pair as an Atom on its own – which would stuff any chance that Nvidia have. Will be interesting to see how it works out.


Silver linings

February 8, 2009

While waiting for the details on my cancer, I seem to have ended up with a lot of time on my hands. I’ve not much work on at the moment, what I do have I’m working through quite quickly, and no-one expects me to take on any new tasks given that I could be imminently off work for 3 months or more.

So I’ve found myself kicking my heels somewhat. Which is definitely a mixed blessing. It’s nice not to be under additional pressure from work, but it does leave me a lot of time to start imagining the types of scenario that frankly, its better not to think about. So I started looking at the honey-dew list for some things to do, until I realised that the reason stuff was on that list was because it all required lots of planning and effort to complete. Ie, no short-term tasks to speak of.

So I finally got around to one of the boring tasks that has been sat on my personal “todo” list for nearly a year now, and digitised my entire CD collection. It’s not as though I actually have that many CD’s – no more than a couple of hundred or so, but it’s still taken several days of almost continuous effort, feeding them into the CD drive, ripping and encoding them.

The original plan was to put them all onto my home server so I could then play them back through my Squeezebox “classic”, and never have to mess with the physical CDs again. Of course, since then time has passed, and I’ve realised I also need those same tracks on my laptop, on my phone (which I use as an mp3 player) and on my kids MP3 players & laptops. So, the question was, what format to rip to?

In theory my Squeezebox supports MP3, FLAC, OGG, WMA and PCM/WAV/AIFF audio natively (ie, without needing transcoding) plus a whole lot more via transcoding at the server. So FLAC was the original “obvious” choice, simply because it is whatever the CD was, and didn’t put any transcoding load on my server. However, compression isn’t as good as the lossy algorithms, and support on hardware devices is patchy. So despite being the biggest archive, I’d still need to maintain extra copies to allow all my playback devices to be supported.

So in the end I’ve ripped everything to MP3 using LAME’s “V1″ option, which gives me ~240kbps variable bitrate encoding. I know its not as good as FLAC, but when I compared the original CD’s to the squeezebox playing back the rip, I honestly couldn’t tell the difference. And I’m saving so much storage space that I can even afford to easily maintain a second copy of the music, transcoded down to a lower bitrate for the phones/mp3 players etc where storage really is at a premium, and the 240kbps rips are too large.

Interestingly, there were several of my CD’s that are starting to exhibit signs of failure … and this is not scratches … rather the actual disk seems to be perishing in some way. Fortunately cdparanoia managed to retrieve all the data (though in one case it took it over 6 hours to do so!) but the original claims for CDs of perfect music lasting forever are clearly not holding up in practice.

Anyway, I finally spent most of today fighting with “EasyTAG”, which whilst not in practice as easy as I hoped, did allow me to get the tagging sorted for all my music relatively quickly. And I’m amazed at the breadth of CD information contained within FreeDB … it knew every CD in my collection, including some short-run private pressings from very small niche artists. Amazing what a big enough cooperative effort can achieve I guess.

The nice thing about having done this, is that since it’s so easy to dip in and dip out of my music collection, I’m finding that I’m listening to stuff that I’d probably never have chosen if I’d had to go find the CD, put it in the player, etc.

Software:
Grip (front-ending LAME and CDParanoia) and EasyTAG under Ubuntu.