Tuesday, October 18, 2011

Ubuntu 11.10 - Getting KeePass2 working with Chrome again

Rather rashly this time around, I updated my system to the latest version of Ubuntu, 11.10, the day it came out. The upgrade itself went fairly smoothly, although I was disappointed to find that the plugin that links my password manager of choice, Keepass2 with my browser of choice, Google Chrome, stopped working. It just popped up an error box saying it didn't recognise the plugin any more. KeePass still worked, it just was no longer able to communicate with Chrome.

After a bit of searching I couldn't find anyone else with the same issue, and I stumbled upon this answer almost by accident. The secret is that the KeePassHttp.plgx plugin, which is what used to work with Ubuntu 11.04, is not what you want any more. What you do want are two .dll files instead. I went through the following steps to get it working again:

1. From the KeePassHttp website, I downloaded the whole package (it gives a choice of a .zip or tar.gz), click either button. Ignore that the page says "Sorry, there aren't any downloads for this repository." There are!

2. Open the package file you just downloaded - double-clicking it will open it in Archive Manager.

3. Open some of the subdirectories in that folder until you find the two files called "KeePassHttp.dll" and "Newtonsoft.Json.dll". Select those two files and drag them to the Desktop. This will extract those two files, making them ready for the next step.

4. Open up a terminal window. Assuming the files are on your desktop, you can use the following command to copy them to the /usr/lib/keepass2 directory:

sudo cp ~/Desktop/*.dll /usr/lib/keepass2

While you are in a terminal window, rename the KeePassHttp.plgx file so KeePass doesn't throw that error up when you open it:

sudo mv /usr/lib/keepass2/KeePassHttp.plgx \ /usr/lib/keepass2/KeePassHttp.plgx.temp

5. If you now open KeePass2, it shouldn't throw up the error box, and if you go to Tools -> Plugins... the plugin should now appear!

One other thing I did was re-install KeePass2. With the latest release, there is no need to use the separate PPA repository as you did in previous versions of Ubuntu. It is now in the main Universe repository. What I did was uninstall KeePass2, remove the jtaylor PPA repository under software sources (either in update manager or synaptic, if you have that installed), and re-install it from the default Ubuntu repository.

I'm not sure if this is needed for the above solution to work, but I did it just to tidy things up a bit. With less repositories to check, updates go a bit quicker too. With any luck it will also install the correct packages required, that may have changed since 11.04.