<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: keepassx</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/keepassx/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Moving From Keepassx To CLI Password Safe Using Vim And GPG</title>
      <link>https://chrisjrob.com/2011/05/04/moving-from-keepassx-to-cli-password-safe-using-vim-and-gpg/</link>
      <pubDate>Wed, 04 May 2011 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2011/05/04/moving-from-keepassx-to-cli-password-safe-using-vim-and-gpg</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/vim_logo.png" align="right" alt="Featured Image">
         
         <p>The more that I work from the command line, the more of a nuisance I
find it that all my passwords are in
<a href="http://www.keepassx.org" title="KeePassX">KeePassX</a> - an excellent GUI
application.</p>

<p>For some time I have intended moving to pwsafe, but am put off by the
time it will take to migrate the data. An alternative is to export the
KeePassX data into an encrypted text file and use the <code class="language-plaintext highlighter-rouge">gnupg.vim</code> Vim
plugin to read and edit it. This post describes how to accomplish this
in a very few steps.</p>

<!--more-->

<p>I first ran KeePassX and deleted the backup group (as I did not wish to
export all my previous generations of passwords). I then exported the
contents to a text file named “passwords” (you could be more
imaginative/secure if you wish!). Then I followed 
<a href="http://awesometrousers.net/post/vim-with-gpg-file-encryption/">these instructions</a>
to create a GPG secured file:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ gpg -c --cipher-algo AES256 passwords
</code></pre></div></div>

<p>And enter your secure passphrase twice. You should now have a new
password file “passwords.gpg”. You can now remove the plain text
version:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ shred --remove passwords
</code></pre></div></div>

<p>In order to edit/view the new passwords.gpg file, we need the Vim
gnupg.vim plugin, which is available in the debian vim-scripts package:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install vim-scripts
</code></pre></div></div>

<p>Then edit <code class="language-plaintext highlighter-rouge">/etc/vim/vimrc.local</code> to add the following line:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>set runtimepath+=/usr/share/vim-scripts/
</code></pre></div></div>

<p>This will import all of the vim-scripts plugins, which may not be what
you want. Alternatively you could probably just copy or perhaps symlink
the gnupg.vim plugin to your <code class="language-plaintext highlighter-rouge">~/.vim/plugin/</code> folder.</p>

<p>And that is it - now whenever you wish to view or edit your passwords
you simply type:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ vim passwords.gpg
</code></pre></div></div>

<p>This will prompt you for your password and open the file.</p>

<p>Initially I found this gave errors in relation to <code class="language-plaintext highlighter-rouge">exuberant ctags</code>,
which I suspect is related to vim-scripts and not to gnupg.vim and is
doubtless a feature of the way I have just pulled in all of the
vim-scripts. One option (and what I did) is just to install
exuberant-ctags as follows:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install exuberant-ctags
</code></pre></div></div>

<p>Now I just have to format passwords.gpg into something a bit more
structured, perhaps with Vim folding configured.</p>

<p>And if you are looking for a way to create passwords, the pwgen is one
option - it offers a selection of fairly memorable passwords from which
to choose.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install pwgen
</code></pre></div></div>

<p>There are some concerns with this approach - anyone can read your
passwords over your shoulder - if you work with others you might be
better off with something like pwsafe. Also some users are concerned
that the contents of the file might be written to memory, although I
believe this is not the case, you should satisfy yourself as to the
security of this approach, as I am certainly not qualified to advise you
on this aspect.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Install KeePassX on Debian Etch</title>
      <link>https://chrisjrob.com/2009/03/21/install-keepassx-on-debian-etch/</link>
      <pubDate>Sat, 21 Mar 2009 06:03:30 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/install-keepassx-on-debian-etch</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/debian_logo.png" align="right" alt="Featured Image">
         
         <p>KeePassX cannot be installed on Debian Etch, because of some dependency issues:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Version: 0.3.1-1
Depends: libc6 (&gt;= 2.7-1), libgcc1 (&gt;= 1:4.1.1-21), libqt4-core (&gt;= 4.3.4), libqt4-gui (&gt;= 4.3.4), libstdc++6 (&gt;= 4.2.1-4), libx11-6, libxtst6
</code></pre></div></div>

<!--more-->

<h2 id="the-solution">The Solution</h2>

<p>The solution is to install from source.  These instructions were borrowed from the following comment (thank you “John”):</p>

<ul>
  <li>http://www.keepassx.org/howto/setup/inst_source_tar#comment-15355</li>
</ul>

<h3 id="install-recent-version-of-qt4">Install recent version of qt4</h3>

<p>I installed from lenny, which is not ideal.  The above instructions do not say to do this, but I had already done it to resolve stability problems (see Install italc notes).</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install qt4-dev qt4-dev-tools qt4-designer
</code></pre></div></div>

<h3 id="install-source-repositories">Install Source Repositories</h3>

<p>You may need to add the lenny source repositories to <code class="language-plaintext highlighter-rouge">/etc/apt/sources.list</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>deb-src http://ftp.uk.debian.org/debian/ lenny main non-free contrib
</code></pre></div></div>

<h3 id="download-source">Download Source</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd
$ mkdir keepassx
$ cd keepassx
$ apt-get source keepassx
</code></pre></div></div>

<h3 id="make">Make</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ cd keepass*
$ qmake-qt4
Project MESSAGE: See 'INSTALL' for configuration options.
Project MESSAGE: Install Prefix: /usr
Project MESSAGE: *** Makefile successfully generated.
Project MESSAGE: *** Start make now.
$ make
</code></pre></div></div>

<p><strong>If you downloaded the source from <a href="http://www.keepassx.org/">KeePassX</a> itself, then you will probably need to cd into the src directory, delete the Makefile that was created and run qmake-qt4 again from there (ie: qmake-qt4; cd src; rm Makefile ; qmake-qt4 ; cd ..</strong></p>

<h3 id="errors">Errors</h3>

<p>If the above still gives an error about libXtst (and mind didn’t), you can either fix the source code, or simply:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo ln -s /usr/lib/libXtst.so.6 /usr/lib/libXtst.so
$ make
</code></pre></div></div>

<p><strong>This section has not been tested by the author</strong></p>

<h3 id="install">Install</h3>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo make install
</code></pre></div></div>

<h3 id="test">Test</h3>

<p>You should see it installed under your Utilities menu, but you may need to log off/on for this to appear.  Alternatively I usually find editing the menu and resaving has the same effect.</p>

<h2 id="references">References</h2>

<ul>
  <li><a href="http://www.keepassx.org/">KeePassX</a>
    <ul>
      <li><a href="http://www.keepassx.org/howto/setup/inst_source_tar#comment-15355">Forum post detailing install method</a></li>
    </ul>
  </li>
</ul>

       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
