10 April 2012

KeePassX on Mac: Opening Two Files Simultaneously

Using KeePassX natively you can only open one file at a time but if you need to have two open at the same time you can create a command file to do it. In Applications/Utilities/Terminal:
  1. Navigate to the directory containing your password file e.g. cd Passwords
  2. Create and edit a .command file to open the file in a new instance of the application:
    vi OpenFile1.command
  3. Press i to start input then type:
    open -n /Applications/KeePassX.app [path from user folder and file name].kdb &
    Note: -n flag opens a new instance, & kills the Terminal window. To make the window exit you need to select "Close if the shell exited cleanly" from Terminal, Preferences, Settings, Shell tab/button, "When the shell exits".
  4. Save and exit the file by pressing: Esc :wq
  5. Make the script executable: chmod +x OpenFile1.command

No comments:

Post a Comment