How to install and open KeePass on Mac OS X form the User Interface and not just open a terminal and type commands?
MacOS – Install and open KeePass on Mac OS X
macos
Related Solutions
The KeePass documentation in http://keepass.info/help/v2/setup.html#mono, although not specifically mentioning OS X, describes your issue:
Clipboard: On some systems, Mono's clipboard routines don't work properly. In this case, install the xsel package. If
xsel
is installed, KeePass ≥ 2.20 uses this utility for clipboard operations.
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:
Ureka (sic). Your 2.19 is on the path to copy paste working on the MAC via Mono! Your button to copy the username, and your button to copy the password works now!!!
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
):$ sudo ln -s /opt/X11/include/X11 /usr/local/include/X11 $ for lib in $(ls /opt/X11/lib/lib*); do sudo ln -sf $lib /usr/local/lib; done
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:
$ cd xsel-1.2.0 $ ./configure --prefix /usr/local $ make make all-am if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused -MT xsel.o -MD -MP -MF ".deps/xsel.Tpo" -c -o xsel.o xsel.c; \ then mv -f ".deps/xsel.Tpo" ".deps/xsel.Po"; else rm -f ".deps/xsel.Tpo"; exit 1; fi gcc -g -O2 -fno-strict-aliasing -Wall -Werror -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused -o xsel xsel.o -lX11 $ make install
You can also install xsel
with MacPorts using the command sudo 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:
System.ArgumentException: Directory does not exists Parameter name: path at System.IO.FileSystemWatcher..ctor (System.String path, System.String filter) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher:.ctor (string,string) at KeePass.Util.IpcBroadcast.FswStartServer () [0x00000] in <filename unknown>:0 at KeePass.Util.IpcBroadcast.StartServer () [0x00000] in <filename unknown>:0 at KeePass.Forms.MainForm.OnFormLoad (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0
I finally found the culprit: The release notes for version 2.20.1 state (http://keepass.info/news/n121004_2.20.1.html):
Changes from 2.20 to 2.20.1: On Unix-like systems, KeePass now stores most of its temporary files in a private temporary directory (preferably in
$XDG_RUNTIME_DIR
).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:$ echo $XDG_RUNTIME_DIR $ mkdir ~/.mono $ export XDG_RUNTIME_DIR=~/.mono/; mono --desktop /Volumes/USB_Flash_Drive/KeePass-2.20.1/KeePass.exe
To do this you will need to install Xcode from App Store and then its command line tools from an option in Xcode as you need a development environment.
It might be easier to use a package manager like Macports or Homebrew after that to install apache and mod_wsgi. the writers of the package will have sorted out any issues.
I will explain the commands in the line after each one
curl -o mod_wsgi.tgz http://modwsgi.googlecode.com/files/mod_wsgi-2.5.tar.gz
Get the source code from the given server. curl is a program that downloads via http. You could just enter the URL in your browser and download the file. The curl command puts the mod_wsgi.tgz in your current directory.
tar -xzf mod_wsgi.tgz
Untar the file - ie get all the individual files out of the package and put them in the correct subdirectories. If you had downloaded in your browser the default action would have down this unpack, or select this file in Finder and double click to extract.
cd mod_wsgi-2.5
Change directory into the top level of the source code. If you had used the browser in the first two steps then cd ~/Downloads/mod_wsgi-2.5
./configure
The source code can be built for many versions of Unix, Linux and possible other operating systems. configure is a shell script that calls on certain programs in Xcode to generate the correct source code files so that this setup will build on OSX. The ./ is required as your current directory is not on your path.
make
Make an executable and support files out of the source code. This will all be in or beneath your current directory. make is a program that does things based on a set of rules held in makefiles.
sudo make install
This puts the executables in a directory that can be used by apache. make install
uses the make program as above but with a command install to do something different (actually if you had not done make before it will also do the build as in the command above as that is defined as a dependency on the makefile but don't do this because of the sudo) sudo is a command that makes the rest of the line run as the root user, this is needed as you should not have permission to write to the directories the executables should end up in, this you need a special command to get that permission. Note that your user needs to be set up to use sudo, if you are an Administrator then that will be sufficient.
This should give you enough pointers to help you read up on anything that I have started to explain.
Related Question
- MacOS – Install gcc to mac via Terminal
- MacOS – After Mavericks 10.9.2 Update, problems running Keepass/Mono
- MacOS – How to use “open in terminal”, and “two windows side by side” on mac
- MacOS – KeePass application with synchronization support on a Mac
- MacOS – KeePass / Mono under Yosemite does not work
- MacOS – OS X terminal “open” command and keeping focus on the command line
Best Answer
I use KeepassX on my macs so I don't have to use the terminal. It is free and you'll find it here: http://www.keepassx.org