2018 Disclaimer: I’ve since switched to KeePassXC. More on that here.
It’s been a little while since I’ve started playing around with Linux Mint on my laptop. It took me very little time to install few major applications and all seemed good. Then I run into a situation which prompted me to convert my desktop to Linux. And this is where things started to get rough(er).
I decided that I want to install KeePassX 2.0.2 as a password manager onto my desktop. I’ve briefly tried to use KeePass2 which is available through the package manager, but quickly realized that it’s an older version and that getting a newer version requires me to trust someone out there who provides a binary. Well, not so keen on trusting unknown entities with a security piece of software. This is when I started looking at KeePassX, for which, unfortunately, the authors provide only sources and not the binaries that can be installed – that means you as an end user have to build it all yourself. It’s not a problem for anyone who’s been using Linux for a while, but a pain in the rear for a newcomer (even though I’ve been doing software for about 2 decades, haha).
Here I will provide you with instructions on how to get this all done. Hopefully it’ll be useful to someone out there.
- Install dependencies:
sudo apt-get install build-essential cmake qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev qt-sdk libxtst-dev libxi-dev checkinstall
- Figure out where you want to build the application (I used ~/Downloads folder)
- Download the source
- Unpack the archive
tar -xvf keepassx-2.0.2.tar.gz
- cd keepassx-2.0.2
- Create a directory in which the build files will be created
- Switch into the build directory
- Prepare to build the application. Make sure to have double dots at the end of the command!
- Build the application
- Use checkinstall tool to build .deb package and install it into the system
- The tool will ask you to set few options. Make sure to set the following values:
- Maintainer: set this to your name/email
- Summary: define brief package summary
- Name: set the name of the application (this will be the name of the package in the end)
- Version: set application version
- Group: set to the group to which this application belongs to
- Alternate source location: set this to the URL from which the source was downloaded
- Follow few next prompts. In the end the tool will create the .deb package and install the executable into /usr/local/bin and a .desktop file into /usr/local/share/applications.
- You can use the .deb file that was created to install the application on any other machine if you’d like
- If you ever want to remove the package, use the following (keepassx is the Name value from #11 above):
dpkg -r keepassx
Well, this should be it. Hopefully this is helpful.