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
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.