By using this site you agree to the use of cookies.

Learn more

Share via:

How to Compile and Install KeePassX on Ubuntu 16.04

KeePassX is compatible with KeePass on Windows, and can be compiled after installing a few extras via apt-get..

312 views

Edited: 2017-01-08 12:20

KeePass is as a free open source password manager for Windows, but apparently it is rather difficult to make it work in Linux using Wine. So I decided to try out KeePassX in Ubuntu which is compatible with KeePass. It is not clear to me if it is still a port of KeePass, but at least it is also open source, and very similar to KeePass on Windows.

KeePassX is apparently also available in the Ubuntu software center, however, when I tried to install it, I was asked to create a Ubuntu one account, and it said it contained non-free software. So It is not clear to me if it is the same thing in software center, so I eventually decided to compile it from source.

You first need to download the source. For KeePassX the source is distributed in a compressed file that looks like this: keepassx-2.0.3.tar.gz (depending on version). Extract this file by right clicking on it in your Downloads directory and clicking "Extract here".

The directory of your source files should look like this: /home/k/Downloads/keepassx-2.0.3 where "k" should be replaced with your own username.

To compile KeePassX on Ubuntu, you may need to first install a few extra things via apt-get first. I.e.:

sudo apt-get install cmake
sudo apt-get install build-essential
sudo apt-get install qt4-qmake
sudo apt-get install qt4-default
sudo apt-get install libgcrypt11-dev
sudo apt-get install zlib1g-dev
cmake .
sudo make install

Note the "." after cmake. This tells cmake to use the current directory. Simply typing cmake as suggested elsewhere will result in an error for some reason.

After compiling, a .desktop launcher will be located in /usr/local/share/applications and the binery will be located at /usr/local/bin/keepassx

For some reason it will not show up in Dash after installing with make install, but when you run KeePassX, you can right click it's icon in unity, and click on "Lock to Launcher". However, since this is a password manager, you might not want to make it obvious that you are using it anyway. Instead you could just launch it from terminal or navigate to the directory whenever you need it, which may also help lower the chance of accidentally leaving it open in unity, and encourage memorization.

To launch KeePassX from the terminal after installing with make install, simply type "KeePassX" into a terminal window and hit enter.

Remember to keep backups of your database file with all the passwords just in case something happens to the file, your hard disk goes bad, or whatever!!

Comments