Linux To The Rescue.

One of my common post types is a big up for Linux, but I can’t help feeling that this one is worth it.

Here at work I was presented with an old, battered laptop whose owner had schlepped around the world with it. It was refusing to start, and the request was to help extract important data before it became inoperable forever.

In the early stages I got lucky and managed to get the computer to boot successfully into Windows. However, the success was short lived, and the system froze, displaying a classic blue screen of death.

The next approach was to try and clone the data from the system using CloneZilla. I created a bootable USB stick, restarted the machine and began cloning the partitions. Unfortunately the two important partitions kept on throwing errors on particular sectors and stopping the cloning process in its tracks. And as the system discs were all using NTFS I wasn’t able to attempt any kind of on-the-fly repairs.

In the end, I got a live CD version of a low resources Ubuntu (Lubuntu, using the LXDE window manager) and booted the system with that. The boot process was seamless and the window manager started without a problem. I then used the command line and some Linux know-how to mount the Windows hard drive and an external hard drive provided by the user. Then it was just a matter of finding the data that the user wanted saved and copying it using the normal file system manager.

It has taken a while. The USB interface on the machine is slow, and data reading from the hard drive seemed sluggish, but it has worked well, and all of the users data is now safe.

It is worth noting that when I say ‘Linux know-how’ then it makes it sound simpler than it was. I realised this when the user asked whether it would be possible for me to tell her how to mount the discs if she needed to do. I started to explain the process, then realised (prompted by the way her eyes were glazing over) that while it is obvious to a long term Linux user it might as well be in a foreign language to a new user. Worse than that, when I tried some Google-Foo I wasn’t replete with good explanations that way either. I’m not sure if this is a failing of my Google-Foo or a gap in the otherwise excellent on-line documentation.


My iMac Approaches Perfection Asymptotically.

I have written several times about the learning curve of turning my 27″ iMac into the computer that I am happy to use all day every day. Much of this process has revolved around me moving away from using the Mac OS X operating system as much as possible. I run Linux, and, as I’ve noted in other entries I have a very tweaked system.

But there was one thing about the Mac that was a problem from the start, and which I hadn’t been able to sort out. I like to listen to music when I work, but as I share an office, I have to be concious of the impact of the impact of music on others around me.

After installing Linux I found that plugging in headphones cut off the sound from the speakers, just as you would expect, but the sound would resolutely refuse to flow from the headphones.

I have finally found a fix, of sorts. The forum post which explains the solution is here.

Essentially a short Python script is created which resets the headphones configuration and allows sound through the headphones. Apparently it needs re-running every time you re-start the computer, but I can live with this. I already run a couple of scripts when I log into the computer in the morning (to turn on my preferred keyboard layout, launch Dropbox, X Screensaver, Synergy and other useful functions).

So now I can listen to music when I’m at my desk and not disturb others with my choice.


Getting Your Message Over…

As part of my job I’m on a mailing list for computer officers from all over the University. By and large this isn’t a hugely busy mailing list. I would guess the biggest use is for people pimping hardware that they no longer need (its incredible how quickly a range of old servers gets snapped up!).

But sometimes (two or three times a year) a subject flares up and the list gets very busy. And today one of those subjects arrived.

One member of the list sent a teaser advert about an announcement which will be made in a months time. The teaser was in the form of a picture file attached to an otherwise blank email.

And the fact that the teaser was an image file attached to an email is what caused all the traffic.

It started off with one user complaining that, because they are using a venerable old email client (Mutt), and the original author neglected to add any ‘alt’ text to their image the user was forced to open the image file in a suitable image viewer, only to discover that the image was almost entirely information free.

The user then received several emails telling him that he could have used another email client and that it would have been fine. However, one of the things that I really enjoy about the University is that it is entirely agnostic about such things, and people are free to use whatever mail client they choose. This is the case even when the choice is both difficult to maintain and causes the user to be unable to upgrade their operating system (yes, I’m looking at you Eudora!). The Computing Service maintains Pine/Alpine available running on the mail servers and accessed via SSH.

I feel a lot of sympathy for the original poster (I’ll call him Mutt). When I first started using email ‘in anger’ I used Pine. It had a steep learning curve, but once you were used to it things got ridiculously easy, muscle memory took over the process of reading, writing and filing emails. But attachments were a problem, and you ended up saving them to some file space and then opening them as required from the file space. Because of this, I sometimes use the Pine system that is available, for that little sting of nostalgia.

I once wrote a similar email to Mutt’s to a mailing list that I was on.  Back then my net connection was ‘dial up’ and I had a bee in my bonnet about the use of html in emails. It was, I contended, a simple matter of signal to noise. Every email is intended to carry an aliquot of information, and ideally the amount of data that had to be uploaded, transmitted and downloaded is proportional to the volume of information in the email. My beef with html email was that most users wrote html emails without even noticing, so never took ‘advantage’ of the available text effects. However, irrespective of whether effects were used or not, the email would then be sent, more often than not as the ‘html’-ised version of the text, followed by the plain version immediately afterwards. The signal to noise ratio in this case was at least half of what it could have been (assuming that there were no html tags used) with the ratio falling further, given the bloat that the html more than likely contained.

So Mutt was making a valid point (the point was even more valid in his case, the data downloaded wasn’t justified by the information to be conveyed, and he needed to go through a couple of hoops to discover that fact). However, the irony in the aftermath is that there then followed a short flurry of emails where many opinions were expressed regarding the use of different email clients and value of data, and so the issue, such as it was, was compounded furiously by the responses received.

My favourite response by far though was the fellow computer officer who, understanding the need to convey the little information involved, but wanting to do so in a text friendly manner generated an ASCII art version of the original teaser poster and sent that to the list. Well played sir!

Linux vs. Windows – Another Linux Success Story.

When I was purchasing my home laptop, I chose a Dell. One of the reasons that I liked the Dell store was the way that I could choose a system and then tweak the requirements as needs be.

As I was running through the options, things like processor, memory and disc size, I remember deliberately choosing not to have a webcam at all.

The reasoning was simple. I was planning to use Linux at least part time on this new computer, and add-ons like webcams were, I thought, difficult to use, or poorly supported. If I didn’t bother having them then I wouldn’t need to fiddle to get them working.

Now, spool forward three or four years. My daughter got a book for Christmas which boasts ‘Augmented Reality’, requiring a simple program install and a webcam. So I borrowed a webcam from work (we have it for those occasions when interviewers want to Skype) and took it home.

Obviously the ‘AR’ software only runs on Windows or Mac, so we booted the laptop into Windows, plugged in the webcam and waited while Windows did its thing.

It is worth noting that Windows 7 does an excellent job of detecting the device and installing the drivers, but it took an inordinately long time to do so (more than 5 minutes, less than 10). But once it was done, it worked very well.

When I got to work this morning I decided to try an experiment by plugging the webcam into my desktop machine running Linux (its a Mac, but it dual boots into Linux because, well, I like it like that!).

I plugged it in, then started up ‘Cheese’, the webcam program where you can add weird and wonderful effects to you images. I then selected ‘Preferences’ and was able to switch between the computers built-in webcam and the USB webcam straight away (with no apparent drivers required).

Now I have a horrible feeling I will need to buy a webcam for home…

2013 Book Report 19: Getting Started With Raspberry Pi – Matt Richardson and Shawn Wallace

For most geeks the Raspberry Pi (from now on the RPi) needs no introduction. Originally designed to enthuse children by providing a small, easy to understand computer, the RPi has taken the geek world by storm, and has sold more than a million units.

It isn’t clear how many of these units have found their way into the hands of youngsters… I suspect most have gone to adults enticed by the low cost computer that bucks the trend for more and more powerful processors.

This book then, is a sort of manual for getting to grips with the RPi. Most users will, I suspect have started their RPi journey using resources that they found on the internet, so a perfectly valid question to ask might well be what advantage a book, static and unchanging can have in the fast moving world of open source.

This seems to me to be the biggest weakness of what is otherwise an excellent resource. The world of computing changes quickly, and this is especially the case at the fringes, and items like the RPi are definitely on the fringe.

The book covers useful territory such as what the various components on the RPi’s board are (surely part of the demystifying of this small computer), how to obtain and install a suitable operating system (one of the areas that has changed most rapidly) and what to expect when you first boot the system.

These are all great tools for beginners, and I would suggest that the thing that you are getting in a book, rather than a random collection of web pages is the expectation that the writing is well done, clear and easy to follow. In my opinion that is exactly what the reader gets here.

The rest of the book is a quick trip through some of the things that you can do with a RPi. This is a useful section in that when I first got one the question I got most often was ‘what is it for’. The really interesting thing with a device like the RPi is that it has connectors which can be used in software to do a whole range of things. These connectors offer a range of ways of interacting with the world. One day I may even build something from the suggestions (or I may try and find something useful to do online).

In summary, this book is both an easy to read and and easy to follow book. It is well written, and doesn’t come over as being dry (well, not to me, less geek orientated readers may disagree). While it is in danger of being rapidly superceded by the changes in the systems that it describes, the quality of the writing compensates for this danger. I would probably recommend just checking for any updates online before undertaking any particular projects.


How To Blow £14k in a morning.

We have a new group of researchers joining our department in the next month. They do work that involves large data sets and fairly big number crunching jobs, so they all need new, well specified computers. So this morning I had to order ten i7 PCs with SSD system drives, Raid drives for data storage etc. 10 of ’em at £1200 each (not including VAT).

Glad its not coming out of my budget…

But also looking forward to unwrapping ten brand new computers.

Another Computer, Another Configuration.

It occurs to me as I sit down to write this blog entry that my missives fall into one of two categories. The first is book reviews. I am still reading at quite a rate, and in reality the blogging of finished books is falling well behind the actual books read. I will fix this in time! Honest.

The Second type of entry is some record of my fun adventures setting up various computers. These have included installing Linux Mint on a large iMac. My latest project has been fiddling with an old Asus Aspire One one of the original netbooks.  I have acquired this, partly as a loaner for M to use while she has been staying in hospital. That way she could catch up on iPlayer programmes, surf the web and the like. These little machines are well suited to light web browsing and will even show YouTube videos etc. Just don’t try and do too much at once.

To make it as usable as possible the first thing I did was install a nice light Linux. In this case I chose Crunchbang. Based on Debian, it has a nice small footprint while enabling the installation of everything that you might want possible from the repositories.  Very aware that this time the machine was being set up to be used by someone else I chose to configure the machine with a ‘normal’ Qwerty keyboard layout, intending to setup Dvorak as a ‘per-user’ option at a later date. Having got everything working (by which I mean Thunderbird for email, Firefox for web surfing and that is about it) I handed it over to M.

As a credit to the usability of a modern Linux M was able to configure wireless access using the hospital wireless key without any input from me. She also figured out everything else she needed. As with most computer users, she was fine apart from the tricky issue of the office suite. My feeling is that LibreOffice is close enough to Microsoft Office for the vast majority of users, but there are differences which make it difficult for those trying to manage documents created in MS Office which are still insurmountable to the non-geek. This fact reared its ugly head recently when M wanted to apply for some jobs. Because of this I chose to relinquish my ‘real’ laptop for a little while, and I became the user of the Aspire One.

Now when I first got the computer back I was happy to use the keyboard in the classic two finger method and to keep the Qwerty keyboard layout. The keyboard is slightly smaller than normal, and is right at the limits of what I would expect to provide comfortable touch typing. But as I have been using it for a few days I decided that I needed to get the system using my preferred Dvorak keyboard layout. It was important that the keyboard layout was only set up for me, and not for any other user of the system.

One of the issues of using a lightweight Linux is that you end up using a lightweight window manager. In the case of Crunchbang this is OpenBox. It is a lovely WM, but a lot of the customisation is done using text files. This includes setting up keyboard layout.

It took quite a bit of Googling. Especially as my preference was to leave the system default as Qwerty. In the end I found instructions on adding a line to the autostart file (~/.config/openbox/autostart) . For a UK Dvorak keyboard this reads:

setxkbmap -layout gb -variant dvorak

This isn’t perfect (that is, it doesn’t match the ‘Dvorak – UK Punctuation’ that is installed on Xfce), but it is close. The @ sign is in the wrong place, but the ” is in the right place!

Essentially it works fine when I am typing ‘normal’ text, but is a bit of a problem as soon as I try and do some non-alphanumeric stuff. I think I just need to tweak the variants just a bit more.  Time to hit the Google again.