Emergency Upgrades

Macsen informed me yesterday that there was something wrong with his laptop so I went to take a quick look. Issues with kids and laptops are generally easy to resolve and I assumed that this would be another five minute job.

It wasn’t.

This time all he had was a screen informing him that something had gone seriously wrong and he should contact the system administrator. The system administrator in this house, as ever, is me.

It turns out that he had attempted to upgrade his laptop and something had happened and now it doesn’t work, which is a surprisingly complete explanation for a 13 year old.

All credit to him for noticing that an upgrade was available and realising that it should be done, and I can’t really blame him for what happened next, because I still don’t know what was the something that happened. That said, it looks like he’d started a distribution upgrade without realising.

Of course, turning the thing off and on again didn’t help. Something has gone seriously wrong and re-installing is the only way out of this. But first, the data.

Actually, the first step was to download and create and Ubuntu Live USB and, once I’d remembered to change the boot options on the laptop, I was able to boot from the USB and find the home folder on the laptop. This, I could then copy to a portable disk drive.

Once this was done, and after the kids were home from karate, Macsen and I sat down together to verify that all of the documents had been backed up correctly. I may be exaggerating slightly here, but the file he was most concerned about was his desktop background.

The installation went as smoothly as you would expect from Ubuntu, so I was able to start the restore of the data just in time for dinner.

After dinner, we completed the updates and initial configuration so that everything that needs to work today, is now working.

Other software (games mainly), we have agreed to sort out at the weekend and then we had a bit of a conversation about why we always do upgrades at the weekend.

I have to say that Macsen was remarkably calm at the prospect of being unable to boot or use his laptop for the foreseeable future. I have, in the past, seen people go completely to pieces for much more minor issues.

So now Macsen has the latest and greatest version of Ubuntu. I’ve only managed a very brief look at it so far, but it is remarkably pretty.

The family IT support is in

One of the pros — or cons, depending on how you look at it — of everyone being at home is that when any of the kids has a computer problem, I am unavoidably available. Today we had problems aplenty.

We got the boys some cheap Dell laptops some time ago, installed Ubuntu on them and set them going. The point has now been reached when, for all three boys, these laptops are being used primarily for school work (or school related activities). So running out of disk space is a serious problem.

Today, one of the laptops ran out of disk space.

My first reaction was to ask how many webcam videos and screen recordings they had been making, but it turns out that the problem was deeper than that — too many old packages clogging up the disk drive. I found the commands necessary to clean up these packages easily enough and set about some vastly overdue laptop maintenance.

This is when the fun began. When I tried to use apt-get autoremove to free up some disk space, it told me that it couldn’t do that because I had some broken dependencies. When I tried to fix these, it told me it couldn’t do that because I didn’t have enough disk space.

And it all started looking a bit painful and the boys quickly learned that IT support largely involves copying and pasting error messages into your search engine of choice and then doing the same back into the terminal.

Everything is now resolved and I have promised to keep a closer eye on the boys’ technology. On the plus side, I now know how to manually remove old kernels in Ubuntu.

Unity online or: Ubuntu’s try before you download

Linux distributions already make it easy to try them out without comitting yourself beyond your comfort zone. Most will guide you through partitioning your disk so that you don’t lose what is already installed, and may provide live media which allow you to boot from a CD, DVD or USB stick and try out the distro without any risk whatsoever.

Canonical, the folks behind Ubuntu, have now made it even easier to try out their distro with a virtual desktop online (which I found via +rich scadding).

While Unity is not for me (Gnome Shell FTW) I do think that this is a great idea, and one that has been very well implemented.

The Great Linux World Map

I’ve seen this Great Linux World Map, from Dedoimedo before, but seeing it again on Tentacled Monkey in Exile reminded me that I hadn’t mentioned it yet. And it’s certainlty worth a mention.

I particularly like the fact that I appear to be sailing northwards, having started out in The Great Communist Empire of Ubuntu I am now floating in the Sabayon Sea and wondering if – or when – I should attempt a landing in the Forbidden Land of Gentoo.

The joy of Xfce

Six months ago, I mentioned the creakiness of my desktop PC and rambled a bit about the various steps I’d taken to keep the memory usage under control. I have done a little more tinkering recently, so now is as good a time as any to ramble some more.

First of all, a disclaimer. I do understand that the best approach would be to either start from a minimal install and build up only what I want, or to find a lighter distro in the first place. The reason I haven’t done this is because my desktop hardware is not as reliable as it could be. This is especially true of the CD/DVD drive. Consequently, I don’t want to install anything from scratch because, if the drive does fail halfway through an install, recovering it will be a nightmare. And I have no intention of replacing any of the hardware on this machine – it is an old box and no longer my primary device so I simply want to ensure that it remains responsive until such time as the hardware fails completely.

I have been a Gnome user since I started using Linux on the desktop and, for me, the huge strength of Gnome has always been that it is an incredibly intuitive desktop to use. However, all this functionality comes at a price in terms of the system resources used, so I started looking at lighter desktop environments.

My first thought was to give Enlightenment a go. There was a very long blog post about this that has now been deleted but the shorter version is that once you start finding your way around, it’s a very nice environment and one that appeals to the minimalist in me. However, it’s not the most intuitive desktop environment I’ve seen and, bearing in mind that the PC has a guest account for when people come to visit, Enlightenment is not the way to go.

So I had a look at Xfce. It’s lovely.

The default theme is every bit as intuitive as Gnome and this is the theme (largely untouched) that the guest account still uses. Things started to become interesting, however, when I started playing around with the Xfce Settings Manager. Not only are the panels very configurable, but Xfce also allows you to do a lot with the right and middle mouse buttons, so I started seeing how much desktop real estate I could free up.

This is the state of my desktop so far.

The Xfce button and notification area are in the top left. In the bottom left – although the auto-hide means you can’t see it – is the task list and wastebasket. In the bottom right is the workspace switcher, which I am thinking about removing since I can access the same functionality by using the middle mouse button. I am also considering having a single, auto hiding, panel in the bottom left of the screen to maximise my available desktop space.

And then there is the cornucopia of options at Xfce-Look.org.

Of course, none of this matters (much) if it doesn’t achieve the primary aim of squeezing a bit of extra performance out of the desktop PC. Fortunately it does, spectacularly. The PC is noticeably more responsive and, according to the System Monitor, the Xfce components are sucking up a lot less memory than the Gnome equivalents.

In other news, I have replaced Epiphany with Midori and uninstalled Mono.

I have looked at Midori in the past, but Epiphany is the browser I keep coming back to. I have found it to be both fast and light and it has the best approach to managing bookmarks that I have encountered to date.

Midori, like Epiphany, is a WebKit browser and it is also fast and responsive. It is also part of the Xfce Goodies component so I thought I’d give it another go. I won’t try to make any speed comparisons, but I have been impressed so far.

As for Mono, I don’t use any of the few, small applications on my PC that depend on it and – quite frankly – having to start the Mono runtime just to launch Tomboy Notes feels like overkill to me. I am intending to try and find some smaller, lighter applications for the PC and Mono is the first to go.

I installed Xfce last weekend but it hasn’t been until this weekend that I have really had a chance to play around with it. What I’ve seen of it so far is fast, flexible and a real joy to use.

Improving Ubuntu performance on older hardware

I first tried Ubuntu way back in 2007 and finally abandoned Windows when Hardy Heron came out on April 2008. At the time Ubuntu was a lot faster than Windows XP – and probably still is. However, I have found that as time has progressed it has started to creak a bit on my desktop. I tried a few other distros earlier this year but eventually came back to Ubuntu mainly because it does just work.

A few weeks ago I had a bit of time and started looking around for lighter distros again. At this point I discovered that my CD/DVD drive had finally crapped out to the extent that burning an ISO was a gamble and trying to boot from it was hopeless. So now it’s time for Plan B – rip out all the stuff that I’m not using.

First to go is Gwibber. I started using this shortly after I signed up to Twitter and it does have some nice features. However it has also become something of a memory hog and appears to be struggling somewhat with the authentication changes Twitter recently implemented. Right now I’m satisfying my microblogging cravings with Pino on Identi.ca and am not missing Twitter at all. Even though Gwibber isn’t running on my PC, gwibber-service is sucking up memory so it’s been completely uninstalled.

Next to go is Ubuntu One. I know there is a fair bit of hype around this but, since it was introduced I can count the number of times I’ve used it on the thumb of one hand. The ubuntuone-synchdaemon is sucking up a sizeable chunk of my minimal memory, so it has to go.

Next to go is DesktopCouch. The desktopcouch-service is costing me half as much memory as Ubuntu One was and, since I’m no longer using Gwibber, I don’t need it. The question of why a twitter client should need any sort of database is something I shall leave to more surreal minds than mine.

Not deleted but no longer used is Firefox. For a while I have been using Epiphany as my main browser – it’s blisteringly fast very light, and has by far the best approach to bookmarks that I have seen. Rather than having to maintain a bunch of folders to manage your bookmarks what you do with Epiphany is simply tag each bookmark with as many or as few tags as you want and then let the browser figure out the folder structure for you.

There are a few services that I don’t expect to use but might. These have not been uninstalled but have been removed from my Startup Applications. They are; the Bluetooth Manager (I have a Bluetooth dongle but it’s horribly unreliable); the Evolution Alarm Notifier (I don’t use alarms in Evolution); and the Power Manager (I have a desktop PC, not a laptop).

Since Upgrading to Ubuntu Lucid, I’ve found that the memory usage on my PC regularly rises to 80% and everything starts grinding to a halt. I’m now using less than 50% of the available memory and am, once again, enjoying a slick and speedy desktop experience.

Pino: another microblogging client

Until recently, my microblogging client of choice has been Gwibber. When it was first released, Gwibber was fast, stable and – most importantly – allowed me to follow multiple streams from the same window. But time moves on and Gwibber has become increasingly bloated and, frankly, a lot less stable than it should be.

So now I’m giving Pino a whirl. It’s not in the Ubuntu repositories yet, but it can be grabbed from the Vala team PPA:

sudo add-apt-repository ppa:vala-team/ppa
sudo add-apt-repository ppa:troorl/pino
sudo apt-get update
sudo apt-get install pino

I’m impressed so far. Pino is fast and light and the only problems I’ve encountered so far can be put down to the fact that Twitter is being unbelievably unresponsive – again.

It would be nice, however, if I could follow both streams in the same window.

Segmentation Faulty Tree in Synaptic

So here’s a good one. Synaptic crashes when you try to open it and if you try to use apt-get from a command line, it tells you you have a Segmentation Faulty Tree.

It’s caused by a corrupted package tree and is very easy to fix:

  • sudo rm /var/cache/apt/*.bin
  • sudo apt-get update

Fixing Corrupt Mail Folders in Evolution

I normally find that Evolution is a very stable and very functional piece of software. But if it does end abnormally (by a sudden, and unexpected system restart, for example), the database managing the various mailbox files and folders can become corrupted. It’s taken me all morning to find a solution – one that turned out to be annoyingly simple in its effectiveness.

The Evolution error messages are a bit terse and corrupted data can be indicated by one or more of the following error messages:

  • Emptying Trash Fails with ‘Error while expunging folder’
  • Summary and folder mismatch, even after a sync
  • Error while Expunging folder
  • Evolution: error storing ‘~/.evolution/mail/local/Inbox (mbox)’

The solution that finally worked was this one:

  • Close Evolution client
  • Move file /home/dc/.evolution/mail/local/folders.db to trash
  • Restart Evolution again. It will rebuild the database and everything should synch successfully.

Poking around various bug trackers did suggest that there have also been problems with some of the metadata files. So if the above fix on its own doesn’t work, it might be worth trying the following:

  • Switch Evolution to Offline mode (File -> Work Offline)
  • Close Evolution client
  • Shut down Evolution: evolution --force-shutdown
  • Remove the metadata files:
    • find ~/.evolution/mail/local -name "*ev-summary" -exec rm -f {} ;
    • find .evolution -name *index.data -exec rm -f {} ;
    • find .evolution -name *index -exec rm -f {} ;
    • find .evolution -name *cmeta -exec rm -f {} ;
  • Start Evolution client
  • Wait until the status bar at the bottom is empty. This could take several seconds.
  • Close Evolution client. This may take a while
  • Start Evolution client
  • Switch Evolution back to Online mode (File -> Work Online)

If all else fails, you can always delete everything and start again:

  • Backup your files! (File -> Backup Settings)
  • Start deleting:
    • rm -rf ~/.evolution
    • rm -rf ~/.gconf/apps/evolution
    • evolution –force-shutdown
  • Find the process ID for ‘gconfd’: ps -ef|grep gconfd.
    This will return a line that looks like this:
    YourUserID 1485 1 0 13:56 ? 00:00:03 /usr/lib/libgconf2-4/gconfd-2
    The 1485, in this case is the process ID
  • Kill that process: kill 1485
  • Start Evolution client. You will be prompted to start creating your accounts.

Back to ‘buntu or: How to get an unsupported NVidia graphics card working in Ubuntu

I know I said yesterday that I was going to stick with Sabayon for a while but, after it failed to boot this morning, I changed my mind. So now I have a Karmic Koala on my desktop. I did have a look around to see what else was out there at the moment but, because I am looking for a stable Gnome environment, Ubuntu was the distro I kept on coming back to.

Not all was plain sailing, however, and my NVidia graphics card remained unrecognised until I found this page which describes how to manually install the the relevant driver.

The instructions are a bit terse so, for future reference, the simplified steps I followed are:

  • Identify your graphics card: lspci | grep -i nvidia
  • Find the relevant driver from your graphics card from the NVidia Website
  • Save the file to your Downloads folder as NVIDIA.run
  • Exit Gnome: Ctrl-Alt-F1
  • Shut down the X-Server: /etc/init.d/gdm stop
  • Switch to the appropriate run level: telinit 3
  • Install the driver: sudo sh ~/Downloads/NVIDIA.run
  • Accept the licence agreement and allow it to update xorg.conf when asked.
  • Reboot

Now to restore my (unnecessarily wiped) data…