Disabling The Annoying Middle-Click Load Clipboard URL Behaviour In Firefox

Posted on Mon 13 July 2009 in Ubuntu • Tagged with eeepc, firefox, ubuntu

I recently bought an ASUS EeePC 1000HE, and have been very pleased with it. I immediately installed Ubuntu 9.04, and was delighted to find all functionality working out-of-the-box.

However, the one thing that has puzzled me the last couple of weeks has been random websites loading in Firefox as I was scrolling web pages (with the two-finger multi-touch functionality), or sometimes even an error dialogue saying the URL was invalid and could not be loaded.

Firefox logo

It turns out that this is because the touchpad sometimes interpreted my scrolling as a middle-mouse-button click - which (previously unknown to me) causes Firefox to load the text in the clipboard as a URL.

This behavior is easily disabled by going to about:config in the address bar, searching for middlemouse.contentLoadURL, and changing the value to false.

Hopefully this might help anyone experiencing the same issues as me. There is more info on the middlemouse.contentLoadURL property at MozillaZine.

Epiphany Webkit on Ubuntu 9.04 (Jaunty)

Posted on Mon 15 June 2009 in Ubuntu • Tagged with epiphany, jaunty, ubuntu, web browser, webkit

Update 05/09/09: since I originally posted this information it looks like the Webkit Team re-organised their PPA. I have updated the instructions - thanks to those who let me know.

I just installed the Epiphany Webkit 2.27.2 browser from the Webkit Team PPA. It seems pretty speedy - and the flash plugin can now used.

  1. Add the Webkit Team PPA and Epiphany Webkit Team PPA repositories by adding the following lines to /etc/apt/sources.list:

    # Epiphany Webkit PPA
    deb http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main
    deb-src http://ppa.launchpad.net/webkit-team/ppa/ubuntu jaunty main
    deb http://ppa.launchpad.net/webkit-team/epiphany/ubuntu jaunty main
    deb-src http://ppa.launchpad.net/webkit-team/epiphany/ubuntu jaunty main
  2. Add the Webkit Team PPA Key:

    wget -O webkit.key http://keyserver.ubuntu.com:11371/pks/lookup?op=get\&search=0x991E6CF92D9A3C5B
    sudo apt-key add webkit.key
  3. Install epiphany-webkit:

    sudo apt-get update && sudo apt-get install epiphany-webkit

Not sure if this will replace Firefox on my desktop machine (I won't be able to give up my Firefox extensions). But I will certainly use this as my main browser on my netbook.

RealPlayer on Ubuntu 8.10 & 9.04 (Intrepid & Jaunty) 64-bit Machines (AMD64)

Posted on Mon 13 April 2009 in Ubuntu • Tagged with firefox, helix player, intrepid, mozilla, plugin, realplayer, ubuntu

I recently needed to install RealPlayer and the RealPlayer mozilla firefox plugin so that I could listen to Adam & Joe's show on BBC 6 Music.

I had previously been using the mplayer mozilla plugin, and although playback worked, it was quite choppy (it didn't seem to buffer too well), and I could not pause/resume or seek.

My first thought was to look in the Medibuntu repositories, and sure enough, there was a realplayer package - unfortunately it seems that this did not include the mozilla plugin.

My next try was to look at the RealPlayer for linux website, but it only has a download for the 32-bit version. I did notice that there was a link to helix player for other platforms. Helix player is an open source media player on which RealPlayer is based. I tried helix player, but this can not play back proprietary codecs (and therefore not the real stream from the BBC website), however it did include a mozilla plugin!

I tried a combination of both - I installed RealPlayer from the Medibuntu repositories, and installed the mozilla plugin from the helix tarball to my home directory. And it works!

Instructions follow:

  1. Enable the Medibuntu repositories.
  2. Install the RealPlayer and libstdc++5 packages: sudo apt-get update && sudo apt-get install realplayer libstdc++5
  3. Load RealPlayer (Applications > Sound & Video > RealPlayer), and in Tools > Preferences, select the hardware tab, and set the audio driver to OSS. Press OK, and close RealPlayer.
  4. Download and unpack (into a temporary location) the Helix Player for AMD64 - I grabbed the linux-2.6-glibc23-amd64 tar.
  5. Copy the contents of the "mozilla" folder to ~/.mozilla/plugins (in your home directory - you may need to create the plugins folder).

Update: Looks as if I may have jumped the gun a bit - looking at the files installed by the medibuntu realplayer package, it does indeed look as if it comes with the mozilla plugin. I do not know why it wasn't working for me (maybe it places it in the wrong location?) - but I am running fine with the above solution (even if it is a bit messy).

Installing thummer 0.01 on Ubuntu 8.04 LTS Server

Posted on Wed 14 January 2009 in thummer • Tagged with apache, cutycapt, django, gecko, thummer, ubuntu, webkit, xvfb

thummer is a website-snapshot and thumbnailing utility I am working on, built using django. Read my previous thummer blog post to find out more about the project.


In this article, I am assuming that we are installing thummer on an existing Ubuntu server (8.04 or later) with Apache already installed, and that you are comfortable with editing apt's sources.list file.

Step 1: Install A "Fake" X-Server

If you do not have a desktop environment installed on your server (probably a good thing!), then you will need to install xvfb, which provides a virtual screen so that we can capture the rendered output of the website:

Xvfb provides an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.
sudo apt-get install xvfb

Step 2: Install CutyCapt

We now need to install CutyCapt (webkit rendering).

First, we need to install the cutycapt dependencies and build tools:

sudo apt-get install build-essential

For hardy only: We also need some packages from hardy-backports - add the following lines to /etc/apt/sources.list.

deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse``

Now install the required qt4 packages:

sudo apt-get update
sudo apt-get install libqt4-dev libqt4-webkit libqt4-svg

It's now probably a good idea to remove (or comment out) the hardy-backports lines from your sources.list file.

Download cutycapt source, and expand the tarball:

cd ~/
wget http://cutycapt.svn.sourceforge.net/viewvc/cutycapt/CutyCapt.tar.gz\?view\=tar
tar -xvvzf CutyCapt.tar.gz\?view\=tar

Compile cutycapt:

cd CutyCapt

Step 3: Install Django

First install some packages we'll need later:

sudo apt-get install python-django python-imaging python-pysqlite2 libapache2-mod-python

For hardy only: The version of django hardy ships with is too old for thummer. Install Jaunty's version of python-django from the updates repository by downloading the .deb file from Launchpad (remember to keep an eye out for future security updates):

cd ~/
wget http://launchpadlibrarian.net/17665378/python-django_1.0-1ubuntu1_all.deb
sudo dpkg -i python-django_1.0-1ubuntu1_all.deb

Step 4: Install & Configure thummer

Download thummer, expand the tarball, and move the extracted files to /var/www:

cd ~/
wget http://launchpad.net/thummer/trunk/0.01/+download/thummer_0.01.tar.gz
tar -xvvzf thummer_0.01.tar.gz
sudo mv thummer_0.01 /var/www/thummer

Make sure subversion is installed:

sudo apt-get install subversion

Download the required site-package, sorl-thumbnails:

sudo svn checkout http://sorl-thumbnail.googlecode.com/svn/trunk/sorl /usr/local/lib/python2.5/site-packages/sorl``

Create the database, and initial admin user:

cd /var/www/thummer/thummer
./manage.py syncdb

Set owner so that the apache process can write to the database:

sudo chown -R www-data /var/www/thummer/database

Set owner so that the apache process can write to the media directory:

sudo chown -R www-data /var/www/thummer/media

Update the django website settings:

sudo nano ./settings.py

Make sure that "XVFB = True", specify the full path to the database for DATABASE_NAME.

Ensure the full path to the CutyCapt binary is correct.

Step 5: Configure Apache

Ensure that the python module for Apache is enabled:

sudo a2enmod mod_python

Create a virtual-host site configuration file:

sudo nano /etc/apache2/sites-available/thummer

Paste in the following configuration - replace "thummer.domainname.com" with your desired domain name:

<VirtualHost *>

  ServerName thummer.domainname.com
  DocumentRoot /var/www/thummer/thummer

  <Directory "/var/www/thummer/thummer">
    AllowOverride All
    Order Allow,Deny
    Allow from All

    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE thummer.settings
    PythonPath "['/var/www/thummer'] + sys.path"

  # Static Media Content
  Alias /media /var/www/thummer/media
  <Location "/media">
    SetHandler None
    Order Allow,Deny
    Allow from All

  Alias /admin-media /usr/share/python-support/python-django/django/contrib/admin/media
  <Location "/admin-media">
    SetHandler None
    Order Allow,Deny
    Allow from All


Enable the site, and restart apache:

sudo a2ensite thummer
sudo /etc/init.d/apache2 restart

Bam! Thats It! Enjoy, and let me know how it goes!


Just use the following URL syntax to reference the image (e.g. in img elements):


the value of [crop] can either be 0 or 1, where 0 = scale & fit, and 1 = scale & crop.

e.g. to generate a 300x300 pixel cropped thumbnail of the BBC News website:


<img src="http://thummer.domainname.com/300/300/1/http://news.bbc.co.uk/" alt="BBC News website thumbnail" />

And here is the result:

BBC News website thumbnail

Remember you can access the admin interface by going to http://thummer.domainname.com/admin where you can delete snapshots - so that they are regenerated next time they are requested.

New Google Favicon

Posted on Sat 10 January 2009 in Google • Tagged with favicon, google

I noticed today that Google has a new favicon (http://www.google.com/favicon.ico).

I made a quick hi-res mock-up using inkscape:

New Google Favicon

New Google Favicon

I still can't make up my mind if I like it or not.