Thursday, October 3, 2013

Install KeePassHTTP on Ubuntu

First, of course, we need keepass, and we'll grab git while we are at it. Git is optional here, it just allows for easier updating.
sudo apt-get install keepass2 git-core
Where to put KeePass plugins is non-obvious, but fortunately some Googling reveals it to be at /usr/lib/keepass/plugins. Lets go there and create a directory for KeePassHTTP.
cd /usr/lib/keepass2/
sudo mkdir plugins
cd plugins
Great, now we just need to download the plugin. As I alluded to at the beginning we can grab the plugin via git for easier updating. The project is maintained at https://github.com/pfn/keepasshttp, but we can just grab the one plugin file we need. In fact, if we checkout the entire repository then KeePass will throw some errors as the plugin is there twice in two different formats and it can only load the plugin one time.
sudo git clone -n https://github.com/pfn/keepasshttp.git --depth 1
cd keepasshttp
sudo git checkout HEAD KeePassHttp.plgx
Now you can update the plugin at any time by running the following from the /usr/lib/keepass/plugins/keepasshttp directory.
git pull
If you are only interested in downloading the file once and not worrying about updates you can simply download the extension file.
wget https://raw.github.com/pfn/keepasshttp/master/KeePassHttp.plgx
Now you can restart KeePass2 and the plugin will be loaded.