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.

8 comments:

  1. Doesn't work for me I'm afraid. I'm using KeePass 2.16
    The plugin doesn't appear in the Plugins menu

    ReplyDelete
  2. Armine, I have added a bit extra to the end of the post - maybe try re-installing it from the main repository as described. Hopefully that will work for you. Otherwise, it may have come down to some random extra Mono package I installed while trying to find the fix...

    ReplyDelete
  3. Thanks! that worked for me. I did install libmono-2.0-dev 2.10.5-1 so that might be what Armine needs.

    ReplyDelete
  4. Hmm, I have tried everything you suggested but no success yet.

    Mono doesn't seem to be the problem as i've got installed all the packages (and more...) this fellow needs to run KeepassHttp:

    "I am able to get KeePass 2.16 running with KeePassHttp on ubuntu 11.10 64bit with the following package list:

    pfnguyen@sixia:~/keepass$ dpkg -l | grep mono
    ii libmono-accessibility2.0-cil 2.10.5-1 Mono Accessibility library (for CLI 2.0)
    ii libmono-corlib2.0-cil 2.10.5-1 Mono core library (for CLI 2.0)
    ii libmono-corlib4.0-cil 2.10.5-1 Mono core library (for CLI 4.0)
    ii libmono-data-tds2.0-cil 2.10.5-1 Mono Data Library (for CLI 2.0)
    ii libmono-data-tds4.0-cil 2.10.5-1 Mono Data Library (for CLI 4.0)
    ii libmono-i18n-west2.0-cil 2.10.5-1 Mono I18N.West library (for CLI 2.0)
    ii libmono-i18n-west4.0-cil 2.10.5-1 Mono I18N.West library (for CLI 4.0)
    ii libmono-i18n4.0-cil 2.10.5-1 Mono I18N base library (for CLI 4.0)
    ii libmono-messaging2.0-cil 2.10.5-1 Mono Messaging library (for CLI 2.0)
    ii libmono-posix2.0-cil 2.10.5-1 Mono.Posix library (for CLI 2.0)
    ii libmono-posix4.0-cil 2.10.5-1 Mono.Posix library (for CLI 4.0)
    ii libmono-security2.0-cil 2.10.5-1 Mono Security library (for CLI 2.0)
    ii libmono-security4.0-cil 2.10.5-1 Mono Security library (for CLI 4.0)
    ii libmono-sharpzip2.84-cil 2.10.5-1 Mono SharpZipLib library (for CLI 2.0)
    ii libmono-sqlite2.0-cil 2.10.5-1 Mono Sqlite library (for CLI 2.0)
    ii libmono-sqlite4.0-cil 2.10.5-1 Mono Sqlite library (for CLI 4.0)
    ii libmono-system-configuration4.0-cil 2.10.5-1 Mono System.Configuration library (for CLI 4.0)
    ii libmono-system-core4.0-cil 2.10.5-1 Mono System.Core library (for CLI 4.0)
    ii libmono-system-data-linq2.0-cil 2.10.5-1 Mono System.Data.Linq Library (for CLI 2.0)
    ii libmono-system-data2.0-cil 2.10.5-1 Mono System.Data Library (for CLI 2.0)
    ii libmono-system-data4.0-cil 2.10.5-1 Mono System.Data library (for CLI 4.0)
    ii libmono-system-drawing4.0-cil 2.10.5-1 Mono System.Drawing library (for CLI 4.0)
    ii libmono-system-enterpriseservices4.0-cil 2.10.5-1 Mono System.EnterpriseServices library (for CLI 4.0)
    ii libmono-system-messaging2.0-cil 2.10.5-1 Mono System.Messaging Library (for CLI 2.0)
    ii libmono-system-security4.0-cil 2.10.5-1 Mono System.Security library (for CLI 4.0)
    ii libmono-system-transactions4.0-cil 2.10.5-1 Mono System.Transactions library (for CLI 4.0)
    ii libmono-system-web-applicationservices4.0-cil 2.10.5-1 Mono System.Web.ApplicationServices library (for CLI 4.0)
    ii libmono-system-web-services4.0-cil 2.10.5-1 Mono System.Web.Services (for CLI 4.0)
    ii libmono-system-web2.0-cil 2.10.5-1 Mono System.Web Library (for CLI 2.0)
    ii libmono-system-web4.0-cil 2.10.5-1 Mono System.Web library (for CLI 4.0)
    ii libmono-system-xml4.0-cil 2.10.5-1 Mono System.Xml library (for CLI 4.0)
    ii libmono-system2.0-cil 2.10.5-1 Mono System libraries (for CLI 2.0)
    ii libmono-system4.0-cil 2.10.5-1 Mono System libraries (for CLI 4.0)
    ii libmono-wcf3.0-cil 2.10.5-1 Mono WCF libraries (for CLI 2.0)
    ii libmono-web4.0-cil 2.10.5-1 Mono.Web library (for CLI 4.0)
    ii libmono-webbrowser2.0-cil 2.10.5-1 Mono Web Browser library (for CLI 2.0)
    ii libmono-winforms2.0-cil 2.10.5-1 Mono System.Windows.Forms library (for CLI 2.0)
    ii libmono2.0-cil 2.10.5-1 Mono libraries (for CLI 2.0)
    ii mono-4.0-gac 2.10.5-1 Mono GAC tool (for CLI 4.0)
    ii mono-gac 2.10.5-1 Mono GAC tool
    ii mono-runtime 2.10.5-1 Mono runtime
    ii ubuntu-mono 0.0.37 Ubuntu Mono Icon theme"

    source: https://github.com/pfn/keepasshttp/issues/23

    Anyway, thanks for your help so far!

    ReplyDelete
  5. I've been trying to get ChromeIPass to work correctly for a couple of days now and your instructions worked! Thank you.

    ReplyDelete
  6. On debian wheezy I had a problem with Newtonsoft.Json.dll
    The version from git was giving me an error when I tried to connect.

    I had to copy the version from the debian package into the keepass2 directory:

    cp /usr/lib/cli/Newtonsoft.Json-4.5/Newtonsoft.Json.dll /usr/lib/keepass2/

    ReplyDelete
  7. Worked okay up to "sudo mv /usr/lib/keepass2/KeePassHttp.plgx \ /usr/lib/keepass2/KeePassHttp.plgx.temp". Terminal just says "No such file or directory". Any idea why?

    ReplyDelete
    Replies
    1. Hi Aaron,

      Not sure why it doesn't appear - it could be gone in a later version than what I'm discussing here. That should be OK - if the file isn't there, you don't have to rename it. That step was just to ensure the .plgx file wasn't used. I actually haven't used KeePass for a while now; now using LastPass.

      Delete