Running KeePass 2.x on OSX using macpack

Last year, I finally declared password bankruptcy and found a password manager that:

  • would integrate with FireFox, or at least import existing passwords
  • is open source (security programs that cannot demonstrate how they are safeguarding your info should not be trusted)
  • is cross-platform capable (WinXP, Win7, OSX, Linux)

Fortunately, I found KeePass. It can run using Mono under OSX, but it can be a hassle to run. The default way of doing that is:

  • Open Terminal and navigate to KeePass directory
  • Typing: mono KeePass.exe

We can do this:

  • Install Mono Framework
  • Download latest version of KeePass 2.x and unpack it
  • Open Terminal and navigate to unpacked KeePass folder
  • Run the following command:

    macpack -o:. -m:winforms -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/ libCocoaSharpGlue.dylib -r:KeePass.chm -r:KeePass.XmlSerializers.dll -r:KeePassLibC32.dll -r:KeePassLibC64.dll -r:License.txt -r:ShinstUtil.exe -r:./XSL -n:KeePass -a:KeePass.exe

This will create a KeePass.app file that you can drag into your \Applications folder, and you should be all set.

8 Comments so far

  1. Sean Carmody on April 10th, 2010

    Thanks for the tip! I’d just decided to switch from Password Safe to KeePass (I was sick of using Password Gorilla on the Mac and wanted something that would work well on a Linux desktop too). I had already installed Mono and downloaded KeePass and your suggestion made running it a breeze. My only suggestion would be to pinch the padlock icon from the KeePass website (which is called plockb_64.png), copy it into the same directory and add -i:plockb_64.png to your macpack command. This will give you a slightly more attractive icon in the dock.

    Love your work!

  2. Sean Carmody on April 10th, 2010

    Maybe I spoke too soon: copying to clipboard doesn’t seem to make it to the Mac’s clipboard.

  3. Brett Veenstra on April 10th, 2010

    @Sean: you’re right, Mono applications do not appear to natively support the system clipboard yet.

  4. Sean Carmody on April 13th, 2010

    Well, for now I am making do with using KeePassX on Mac and Linux (http://www.keepassx.org/) which is essentially KeePass 1.7. I will keep an eye on the Mono version though.

  5. Brett Veenstra on April 18th, 2010

    @Sean: KeePass X does look like a real alternative for cross-platform password manager. Thanks for your comments!

  6. jerome on June 10th, 2010

    I’m switching from pc to mac. used Keepass for a long time. So I’m happy to find the above solution. unfortunately it’s not possible to copy paste the passwords.

    Anyone an idea if this would work if your run Keepass in Parallels (http://www.parallels.com)

  7. Brett Veenstra on June 10th, 2010

    @jerome: I’ve been using KeePassX for a cross-platform solution. Although I’m tempted to look at 1Password now that they’re releasing a Windows version. It will make synchronization so much easier.

  8. Wiredfire on August 4th, 2010

    Synchronization can be achieved with Keepass / KeepassX by storing the database file in Dropbox. Of course make sure you’re password is strong and I’d recommend using keyfiles. Dropbox is pretty secure but it is a third party system do due precautions should be used.

Leave a Reply