Tag Archives: handy

Add a search engine to Ubuntu Touch browser

You can’t add search engines with the browser GUI, perhaps because Ubuntu Touch is a Work-In-Progress and it’s still early days. Adding search engines to browsers still has patchy support from major browsers, even though the OpenSearch standard is donkey’s years old. I installed Ubuntu Touch on my Nexus 4 after experiencing the “Sleep Of Death” too many times and wanted to use my Firtl search proxy in Touch’s browser.

I located the configuration files (they’re OpenSearch XML description documents, which is handy!) by using grep -r to search for one of the existing search engine names. The search engine description documents are located (on my phone) in


The / filesystem appears to be mounted read-only and must be remounted read-write to make changes. I did this with the command

mount -o remount,rw /

Copy your search engine’s OpenSearch description document into this directory and next time you attempt to set Ubuntu Touch’s web browser’s search engine, you should see the new search engine in the list. Don’t forget to remount / read-only.

Happy Searching!

Generating coloured-in election map images with SVG

The Election Boundary Map generator in Firtl’s sandpit will attempt to match a text data file with an SVG image of the UK (actually only Great Britain since Northern Ireland is not on the Ordnance Survey map) showing political constituencies. Simply upload a text file with two fields on each line. The first field should be the name of the constituency, the second a numeric value such as a percentage. Separate the two fields with a space.

A coloured map will be generated to reflect the value in each constituency. The colours are drawn from a red-green-blue spectrum from 0 to 100%, or 0 to the maximum value found in the file if the “Stretch values” checkbox is set. Constituencies for which no matching name is found in the uploaded file will be left uncoloured.


The map images are available in PNG, JPEG and SVG. Here are PNG examples of the percentages of votes cast for some of the better-known options at the 2010 General Election, in alphabetical order:












Liberal Democrat


Plaid Cymru





The SVG maps were generated from data from the Ordnance Survey’s OpenData Boundary-Line product (sorry, can’t give a direct in-page link as OS’s HTML is broken). I used the free QGIS mapping application to export SVG from the OS data, but had to edit QGIS’ SimpleSvg plugin to embed constituency names from the ‘Attribute Table’ to allow more straightforward colouring of the map.

The data I used to colour the maps I found by visiting http://en.wikipedia.org/wiki/Results_of_the_2010_United_Kingdom_general_election_by_parliamentary_constituency and following the link to the Electoral Commission’s General Election 2010 Results Data (sorry, no direct in-page link as the Electoral Commission’s HTML is insufficiently marked-up).

The electoral data is in one great Excel file (why not an open format?), which I transformed into individual files for upload to my map generator. Here are the files:

election2010bnp election2010conservative election2010green election2010independent election2010labour election2010libdem election2010plaidcymru election2010snp election2010ukip

Goodwill GW Instek GDS-2062 oscilloscope firmware

I found some files relating to the now-discontinued GDS-2062 oscilloscope. For the sake of posterity and anyone else interested in upgrading the firmware on their ‘scope, here they are:


Firmware v1.11

User manual

I found the firmware, manuals and more on the Hungarian ‘PROCONTROL’ website. I can’t vouch for the authenticity or otherwise of the firmware, but it installed a treat on my GDS-2062 and cured a peculiarity with the controls.

HMRC Companies House Return Service PDF Filing on Ubuntu (64 bit)

Ubuntu includes a pretty good, basic PDF reader called “Document Viewer / evince”. The Return Service from Companies House uses a PDF document which needs the support offered by Adobe’s Reader. Installing Adobe Reader on the latest (14.04 LTS at the time of writing) 64-bit Ubuntu is not quite as simple as pointing and clicking.

Here are the steps I needed:

Get and install adobe reader by following the instructions from http://askubuntu.com/questions/89127/how-do-i-install-adobe-acrobat-reader which follow the heading “For Ubuntu 14.04 (and 13.10), 32 or 64-bit”

I’m guessing that installs a 32-bit version of Adobe Reader which will start up when run from the command line but will complain about some missing modules which can be installed by

sudo apt-get install libcanberra-gtk-module:i386 libidn11:i386

and a missing theme fixed also by installing

sudo apt-get install gtk2-engines-murrine

One more complaint fixed by installing

sudo apt-get install unity-gtk2-module:i386

… left a complaint about “overlay-scrollbars” as the only outstanding error message at the command line. It’s not obvious what installing these extra modules improved in the PDF document.

The Companies House Return Service PDF opens up in evince (the default PDF viewer) with a message that says the PDF document won’t work in all viewers and to ‘Please Wait’. The wait never ends and it must be assumed that evince doesn’t support all the features the Companies House PDF requires. Opening the same file in Adobe Reader shows (for me) a blank screen for 20 seconds or so, before the introduction page appears. Navigation through the Return is by ‘Back’ and ‘Next’ buttons at the foot of each page.

One further problem is that HMRC appear to be using a self-signed certificate which you have to explicitly ‘trust’ in Adobe Reader. The instructions for this are contained in a PDF. Direct links to the PDF are all over the Web, but the person who would follow instructions to accept a self-signed certificate from a directly-linked PDF document does not deserve security.

Here’s my best attempt at a link to the document that explains how to trust the self-signed Companies House security certificate. Satisfy yourself that you’re looking at the Companies House website before downloading and following those instructions! The instructions are in the document linked as “a guide on changing settings in Adobe Reader”.

After trusting Edward Tucker’s certificate, you should be ready to start filing. Good luck!

Wouldn’t this be so much easier if they’d just made a web-based Return Filing Service?

Screenshot (PNG) of large web page from Firefox

Was having little luck with printing-to-PDF and addons until I saw a comment to the effect that Firefox has a command line interface since many version ago. Just press shift-F2 and a prompt appears at the foot of the Firefox window. Entering ‘help’ lists the available commands, one of which is ‘screenshot’.

You can get help for screenshot with ‘help screenshot’ but the option format seems to be out of date (in version 22.0). The way to enter the command line swithces is to precede them with ‘–‘. As soon as you type the double-dash you should be prompted with the available arguments. So for example to copy the entire current webpage to your clipboard, you’d type shift-F2 (the CLI doesn’t seem to notice if you change tabs) and enter:

screenshot --clipboard --fullpage

To save the whole current webpage press shift-F2 and enter:

screenshot screen.png --fullpage

Hope this helps!