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

1-click automatically open a Keepassx database

No comments

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.


Error: Your Requested widget " ai_widget-6" is not in the widget list.
  • [do_widget_area above-nav-left]
    • [do_widget_area above-nav-right]
      • [do_widget_area footer-1]
        • [do_widget id="wpp-4"]
      • [do_widget_area footer-2]
        • [do_widget id="recent-posts-4"]
      • [do_widget_area footer-3]
        • [do_widget id="recent-comments-3"]
      • [do_widget_area footer-4]
        • [do_widget id="archives-4"]
      • [do_widget_area logo-bar]
        • [do_widget id="oxywidgetwpml-3"]
      • [do_widget_area menu-bar]
        • [do_widget id="search-3"]
      • [do_widget_area sidebar]
        • [do_widget id="search-4"]
        • [do_widget id="ai_widget-2"]
        • [do_widget id="categories-5"]
        • [do_widget id="ai_widget-3"]
        • [do_widget id="ai_widget-4"]
        • [do_widget id="ai_widget-5"]
      • [do_widget_area sub-footer-1]
        • [do_widget id="text-4"]
      • [do_widget_area sub-footer-2]
        • [do_widget_area sub-footer-3]
          • [do_widget_area sub-footer-4]
            • [do_widget_area upper-footer-1]
              • [do_widget id="search-2"]
              • [do_widget id="recent-posts-2"]
              • [do_widget id="recent-comments-2"]
              • [do_widget id="archives-2"]
              • [do_widget id="categories-2"]
              • [do_widget id="meta-2"]
            • [do_widget_area upper-footer-2]
              • [do_widget_area upper-footer-3]
                • [do_widget_area upper-footer-4]
                  • [do_widget_area widgets_for_shortcodes]
                    • [do_widget id="search-5"]
                    • [do_widget id="ai_widget-6"]
                  • [do_widget_area wp_inactive_widgets]
                    • [do_widget id="wpp-2"]
                    • [do_widget id="text-1"]
                    • [do_widget id="recent-posts-3"]
                    • [do_widget id="categories-3"]
                    • [do_widget id="archives-3"]
                    • [do_widget id="icl_lang_sel_widget-3"]

                  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.

                   

                  About the author

                  Daniel López Azaña
                  Freelance AWS Cloud Solution Architect & Linux Sysadmin

                  Entrepreneur, a generator of ideas and restless mind. Passionate about new technologies, especially Linux systems and Open Source Software. I also like to write about Technology News, Cloud Computing, AWS, DevOps, DevSecOps, System Security, Web Development and Programming, SEO, Science, Innovation, Entrepreneurship, etc.

                  Daniel1-click automatically open a Keepassx database

                  Leave a Reply

                  Your email address will not be published.