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.
#1 by Sean Carmody on April 10, 2010 - 4:35 am
Quote
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 by Sean Carmody on April 10, 2010 - 5:52 am
Quote
Maybe I spoke too soon: copying to clipboard doesn’t seem to make it to the Mac’s clipboard.
#3 by Brett Veenstra on April 10, 2010 - 6:43 am
Quote
@Sean: you’re right, Mono applications do not appear to natively support the system clipboard yet.
#4 by Sean Carmody on April 13, 2010 - 2:45 am
Quote
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 by Brett Veenstra on April 18, 2010 - 7:40 pm
Quote
@Sean: KeePass X does look like a real alternative for cross-platform password manager. Thanks for your comments!
#6 by jerome on June 10, 2010 - 8:53 am
Quote
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 by Brett Veenstra on June 10, 2010 - 9:53 am
Quote
@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 by Wiredfire on August 4, 2010 - 9:04 am
Quote
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.
#9 by Paco on September 15, 2010 - 1:01 pm
Quote
This is fantastic. I just bought a new MBP and am a long-time Windows user. I too found the command line route annoying and I had no idea how to create an app. THANK YOU!
#10 by NewMacBook on December 17, 2010 - 6:55 pm
Quote
Hi, I did exactly the same as per instructions but seems nothing is happening. Can someone help me out.. btw, I am a new to mac .. pls help
#11 by Pavel on February 10, 2011 - 8:06 am
Quote
Thanks for article!
This helps, and application appears, and it runs. But when i try to open database file, or click to “Create new” – program crashes. Actually the same happens when i’m running windows binary under mono.
Can you help?
#12 by Adil on March 10, 2011 - 2:04 am
Quote
Hi. Thank you very much for the command. I couldnt get the exe running using mono but your command really did the trick. Is it possible to also include plugins. I use KeePass Sync plugin which syncs my db on Amazon S3. For now, i am using Dropbox for now but including the plugin would be great if possible. Thank you. Adil.
#13 by Steven Davidson on April 3, 2011 - 9:38 pm
Quote
New to Macs but a long-time fan of KeePass I got it working on my new MBAir using Mono 2.6.7, but creating the app fails with the message that a Mono file is missing. I did type the path correctly and the file name: libCocoaSharpGlue.dylib as shown above.
My manual search of the directory and the search box in the Finder (is that Spotlight I’ve been hearing about?) didn’t turn up that library file.
Any advice . . . commiseration?
Thank you for your kind contribution to those of us moving to Mac.
Regards./Steve
#14 by nine on May 26, 2011 - 8:38 am
Quote
ace instructions dude
#15 by Jim Sweeney on May 31, 2011 - 10:44 pm
Quote
Awesome, I’m new to both MAC and KeePass and this tip saved the program from the recycle bin, excuse me I mean Trash. Took me a few minutes to figure out that I could just copy and past that whole command into Terminal. I was hitting enter after each line. oopps. Thanks
#16 by Wolf on July 18, 2011 - 2:59 pm
Quote
Hi. I’ve installed MonoFramework-MDK-2.10.2_5.4.macos10.novell.x86.dmg (as well as the MRE version) but as Steve Davidson remarked, the file libCocoaSharpGlue.dylib is not installed. Could you help about where to get this? Is it maybe included in an earlier version of mono? Would be much appreciated. (fwiw: Keepass works nicely)
#17 by Brett Veenstra on July 18, 2011 - 8:27 pm
Quote
Sorry guys, I don’t know where to get libCocoaSharpGlue.dylib anymore. It should be here: /Library/Frameworks/Mono.framework/Versions/Current/lib/ libCocoaSharpGlue.dylib but after installing & downloading Mono 2.6.7 I couldn’t find it.
It seems there are similar types of files ending in .so but this is where my Mono experience falls way short.
#18 by Phil R on October 7, 2011 - 8:36 am
Quote
I found a way that seems to work OK for me (running mac lion) using mono 2.10.5.0. Just left out many of those arguments
macpack -n:KeePass -a:KeePass.exe -o:. -m:winforms
#19 by suan on November 5, 2011 - 2:25 am
Quote
Worked like a charm on Lion (except the Keypass icon isn’t shown correctly in the launcher, but thats a small annoyance), thanks!
#20 by Nir on January 11, 2012 - 5:26 pm
Quote
I have followed all the instructions but failed to produce an App. DO I need to enter the commands into Terminal one by one, or submit them en batch?
#21 by Nir on January 11, 2012 - 5:33 pm
Quote
I have gone through the process again. I am entering: /Applications/KeePass/KeePass-2.18 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
and getting: -bash: /Applications/KeePass/KeePass-2.18: is a directory
What am I doing wrong?
Pingback: KeePass unter Mac OS X Lion | Schimmelkolonie
#22 by Brett Veenstra on January 20, 2012 - 7:18 am
Quote
@Nir: I’m not sure what the problem is. You should have a KeePass.app when it’s been macpacked. Try to find that app package.