KeePass will not copy and paste, let alone do autotype.
I have installed the KeePass 2.18 Mac package from http://keepass2.openix.be/. I could not find a more recent Mac package for KeePass, so I also replaced all of that package's files with those from the Portable KeePass 2.20.1 (ZIP Package). That was from the page http://keepass.info/download.html, link to actual zip: http://downloads.sourceforge.net/keepass/KeePass-2.20.1.zip. So I'm successfully running KeePass 2.20.1.
I'm running Mono version 2.10.9.
I'm running OS X 10.7.5 on a MacBook Pro.
I can't believe that KeePass's site touts Mac compatibility when it won't copy/paste. That's pretty core functionality to be missing. Searches reveal others have had this problem since 2.18, but no workarounds, no bug reports.
Has anyone been able to resolve this issue?
Best Answer
The KeePass documentation in http://keepass.info/help/v2/setup.html#mono, although not specifically mentioning OS X, describes your issue:
So
xsel
should help. (xsel
is available from MacPorts (http://www.macports.org/ports.php?by=all&substr=&page=316&pagesize=50). The source is available here: http://www.vergenet.net/~conrad/software/xsel/#download)EDIT: But it doesn't. I was curious so I compiled
xsel
on my Mac. It didn't solve the issue with copy/paste (tested with Portable KeePass 2.20.1), as I feared, I must say. Why? Because as stated here http://www.kfish.org/software/xsel/xsel
is a tool that manipulates the clipboard contents of X11 applications. X11 provides the graphical user interface for Linux and UNIX, but OS X uses Quartz instead, and so does Mono, as I realized (see http://www.mono-project.com/WinForms#About_System.Windows.Forms).There's a workaround for copying username and password to clipboard, as explained in this thread http://sourceforge.net/projects/keepass/forums/forum/329221/topic/5106260:
The poster above refers to these buttons (portable KeePass 2.20.1 shown running on Windows (sorry, no Mac nearby)):
For copying the username:
For copying the password:
EDIT:
I'd like to share how I compiled
xsel
in case somebody needs it on OS X:Install X11 from http://support.apple.com/kb/HT5293 (this only applies to OS X 10.8 "Mountain Lion" users).
Symlink header and library files from
/opt/X11/include/X11
to/usr/local/include/X11
and from/opt/X11/lib
to/usr/local/lib
(alternatively you can symlink to/usr/include
and/usr/lib
):Otherwise you will get lots of errors about files not found or missing symbols. I tried passing the non-standard X11 directories as an option to
./configure
without success.Download from http://www.vergenet.net/~conrad/software/xsel/#download and extract, for example, to your Desktop.
You need
gcc
plus libraries. Install Xcode and then install the command line tools from Xcode>Preferences>Downloads>Components.Change directory, configure and compile:
You can also install
xsel
with MacPorts using the commandsudo port install xsel
. In my setup it also required the symlinks for the X11 libraries and header files and needed much longer to compile.I'd also like to share some caveats when using KeePass on a Mac:
KeePass 2.18 (from http://keepass2.openix.be) has trouble with case-sensitive HFS+.
KeePass.exe
is typedKeepass.exe
(notice lowercase 'p') inKeePass2.18.app/Contents/MacOS/startkeepass.sh
(so that it silently fails). I had to use a USB flash drive formatted with case-insensitive HFS+ and run KeePass from there.I had a lot of trouble getting KeePass 2.20.1 to work on OS X 10.8 "Mountain Lion". It couldn't get rid of the error message:
I finally found the culprit: The release notes for version 2.20.1 state (http://keepass.info/news/n121004_2.20.1.html):
According to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html:
$XDG_RUNTIME_DIR
defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user ...XDG_RUNTIME_DIR
was not set. I set it to a directory I owned and KeePass worked like a charm: