Daniel López Azaña

Theme

Social Media

Blog

GNU/Linux, Open Source, Cloud Computing, DevOps and more...

1-click automatically open a Keepassx database

keepassx

Those who use the tool KeePassX (KeePass clone for Linux and Mac OS X) to safely save passwords and login details at one single place will have seen many times on the need for rapid access to their repository of passwords with a single click. However, by default when accessing KeePassX none repository is open, or one is open that does not correspond to the one we want to check, so often it’s necessary to browse the file system to locate and select the corresponding file. If in addition to a master password we use a key file to improve security, we have to repeat the same process over and over again to locate and select the key file.

However, in this case security need not be at odds with speed , as there is a simple method that will enable us to always open the same database and the same key file, no matter the last we opened before, with a single click on an icon on our desktop panel. If we combine this method also using Dropbox or some other cloud storage service we’ll be able to quickly and securely access to our passwords repository from any location.

The config.ini file

To achieve that always the same database is open when we launch KeePassX, even if we have several databases and the most frequently used is not the last we opened, edit the config.ini file which is normally kept in the ~/.config/Keepassx/ folder of our home directory. We’ll set the last database and the last open key file using LastFile and LastKeyLocation options. Then assign read-only permissions to the file, which will assure that the last database and key files used by KeePassX are always the same, the ones we most frequently use.

<pre>[UI]
MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\x30\0\0\x2\xd9\0\0\x2\x1d\0\0\0\x3\0\0\0G\0\0\x2\xd6\0\0\x2\x1a\0\0\0\0\0\0)
VSplitterPos=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x1e\0\0\0\x46\0\x1\0\0\0\x6\x1\0\0\0\x1)
HSplitterPos=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x34\x80\0\0\x16\x80\x1\0\0\0\x6\x1\0\0\0\x2)
ShowStatusbar=true
Columns=11111000000
ColumnOrder="0,1,2,3,4,5,6,7,8,9,10"
ColumnSizes="93,93,93,93,93,93,93,93,93,93,93"
ColumnSort=0
ColumnSortOrder=0

[Options]
LastKeyLocation=/home/daniloaz/.ficheroLlave.key
LastKeyType=Composite
LastFile=/home/daniloaz/Dropbox/Keepassx/repositorio.kdb

[FileDlgHistory]
ENTRY0=MainWindow_FileOpen, /home/daniloaz/Dropbox/KeepassX/, 0
ENTRY1=PasswordDlg, /home/daniloaz/, 0

Automatic launcher

Finally, add a launcher on one of your desktop panels to make your application automatically opens. For those who use Gnome, just right click on one panel and click Add to Panel -> Custom Application Launcher. In the dialog box that is shown introduce the following:

And that’s all. Now every time you click on this launcher KeePassX will be opened directly into the initial dialog box stuffed with all data as shown in the first screenshot of this post. You just have to introduce your master password to access your repository.

KeePass KeePassX
Daniel López Azaña

About the author

Daniel López Azaña

Tech entrepreneur and cloud architect with over 20 years of experience transforming infrastructures and automating processes.

Specialist in AI/LLM integration, Rust and Python development, and AWS & GCP architecture. Restless mind, idea generator, and passionate about technological innovation and AI.

Related articles

hot-button-ssh-command-widget-icon

Linux remote control from your smartphone via SSH button widgets

In this post I will tell you about an Android app that is extremely useful to run commands remotely on a Linux computer: Hot Button SSH Command Widget. This application allows you to launch conveniently any command you want on a remote computer through SSH only with the push of a button on the screen of your mobile phone or tablet. This not only will facilitate automation of repetitive tasks, but also is very interesting from the perspective of security for the same reasons I exposed in my Automatically lock/unlock your screen by Bluetooth device proximity post. It will allow you for example to lock and unlock the screen without having to type your password again and again in sight of other people.

July 15, 2017
Script to automatically change all gp2 volumes to gp3 with aws-cli

Script to automatically change all gp2 volumes to gp3 with aws-cli

Last December Amazon announced its new EBS gp3 volumes, which offer better performance and a cost saving of 20% compared to those that have been used until now (gp2). Well, after successfully testing these new volumes with multiple clients, I can do nothing but recommend their use, because they are all advantages and in these 2 and a half months that have passed since the announcement I have not noticed any problems or side effects.

February 16, 2021
AWS security groups

How to automatically update all your AWS EC2 security groups when your dynamic IP changes

One of the biggest annoyances when working with AWS and your Internet connection has a dynamic IP is that when it changes, you immediately stop accessing to all servers and services protected by an EC2 security group whose rules only allow traffic to certain specific IP’s instead of allowing open connections to everyone (0.0.0.0.0/0).Certainly the simplest thing to do is always allowing traffic on a given port to everyone, so that even if you have a dynamic IP on your Internet connection you will always be able to continue accessing even if it changes. But opening traffic on a port to everyone is not the right way to proceed from a security point of view, because then any attacker will be able to access that port without restrictions, and that is not what you want.

January 12, 2021

Comments

Be the first to comment

Submit comment