User Tools

Site Tools


config:keepass

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:keepass [2023/05/29 11:55] – external edit 127.0.0.1config:keepass [2026/04/22 17:24] (current) Wuff
Line 7: Line 7:
 sudo add-apt-repository ppa:ubuntuhandbook1/keepass2 sudo add-apt-repository ppa:ubuntuhandbook1/keepass2
 sudo apt update sudo apt update
-sudo apt-get install keepass2 ca-certificates +sudo apt-get install keepass2 ca-certificates libmono-system-windows-forms4.0-cil
 </code> </code>
  
Line 283: Line 283:
 set google sync plugin to sync both on saving and opening set google sync plugin to sync both on saving and opening
  
 +===== KeeAutoExec plugin =====
 +
 +This plugin automatically opens additional databases.
 +
 +https://keepass.info/plugins.html#keeautoexec
 +
 +Installation:
 +<code>
 +wget https://keepass.info/extensions/v2/keeautoexec/KeeAutoExec-2.6.zip
 +sudo mkdir -p /usr/lib/keepass2/Plugins/
 +sudo unzip KeeAutoExec-2.6.zip -d /usr/lib/keepass2/Plugins/
 +rm KeeAutoExec-2.6.zip
 +</code>
 +Then restart keepass
 +
 +To use:
 +  * Create a new group in your database and name it "AutoOpen" (without the quotes).
 +  * Each non-expired entry in this group corresponds to a database that should be opened automatically when the current database is opened. The fields of each entry specify the following:
 +    * Title: Ignored by the plugin; can be used for comments.
 +    * User name: Must contain the path to the key file, if one should be used. The path can be either absolute or relative to the directory containing KeePass.exe.
 +    * Password: The master password for the database to open. If no password is required, leave this field empty.
 +    * URL: Path to the database file to open. The path can be either absolute or relative to the directory containing KeePass.exe.
 +  * Server credentials. When opening a database from a URL, the credentials for accessing the file on the server can be specified using the custom entry strings "IocUserName" and "IocPassword". These strings must not contain new-line characters.
 +  * Custom entry string "Visible" set to "False" will hide autoopen entries from Menu -> open
 +  * Custom entry string "Focus" set to "Restore" will switch the active tab to the main database again.
 +  * Custom entry string "ifDevice" can be used to exclude or include specific devices i.e. '!OnePlus DN2103 (b6e6...)' excludes a specific OnePlus mobile.
 +
 +===== Open specific db on startup =====
 +
 +  * Turn off the option 'Remember and automatically open last used database on startup' (in 'Tools' → 'Options' → tab 'Advanced').
 +  * Go 'Tools' → 'Triggers' → button 'Add'. Enter a name for the new trigger, e.g. 'Open specific database'.
 +  * Switch to the 'Events' tab and add the event 'Application started and ready'.
 +  * Switch to the 'Actions' tab and add an 'Open database file' action. In the action details, set the parameter 'File/URL' to the path of the database file that KeePass should open when it is started.
 +
 +Opening multiple specific databases at KeePass startup can for example be realized using the trigger approach above (with multiple trigger actions) or using the KeeAutoExec plugin. 
 +
 +===== Problem with dialog buttons missing text =====
 +
 +Current libgdiplus of debian/ubuntu/mint contains libpango which causes problems with keepass2. Option is to downgrade until fixed upstream.
 +
 +<code bash libgdiplus_downgrade.sh>
 +#!/bin/bash
 +doKeepassFix() (
 +  # check os
 +  #. /etc/os-release
 +  #[[ ${ID_LIKE} = "debian" ]] || {
 +  #  : ${EXCEPTION:?$(echo -e "\e[41mThis script is intended to run on ${ID_LIKE} line os\e[0m")}
 +  #}
 +
 +  # if libgdiplus exists and does not embeds pango then skip process
 +  libgdiplus="/usr/lib/libgdiplus.so"
 +  [[ ! -e ${libgdiplus} ]] ||
 +    [[ $(strings ${libgdiplus} | grep pango | wc -l) -gt 0 ]] || {
 +      echo "Nothing to do - libgdiplus already patched" >&2
 +      return 0
 +    }
 +
 +  # Perform downgrade
 +  arch=$(dpkg --print-architecture)
 +  baseUrl="http://ftp.de.debian.org/debian/pool/main"
 +  pkgs=(
 +    libj/libjpeg-turbo/libjpeg62-turbo_2.1.5-4
 +    libw/libwebp/libwebp6_0.6.1-2.1+deb11u2
 +    t/tiff/libtiff5_4.2.0-1+deb11u5
 +    libg/libgdiplus/libgdiplus_6.0.4+dfsg-2
 +  )
 +  cd $(mktemp -d)
 +  retCode=0
 +  for pkg in ${pkgs[@]}; do
 +    url="${baseUrl%/}/${pkg#/}_${arch}.deb"
 +    curl -sSLfO "${url}" &&
 +      sudo dpkg -i ./${url##*/} || {
 +        # Raise error code
 +        retCode=${?}
 +        # Display debug
 +        echo -e "\t\    e[1;4mcwd\e[0m: $(pwd)" >&2
 +        echo -e "\t\    e[1;4murl\e[0m: ${url}" >&2
 +        echo -e "\t\e[1;4mpackage\e[0m: ./${url##*/}" >&2
 +        break
 +      }
 +  done
 +
 +  # Lock package if no error occured
 +  [[ ${retCode} -gt 0 ]] || sudo apt-mark hold libgdiplus
 +)
 +
 +doKeepassFix
 +</code>
 +
 +Run with sudo
 +<code>
 +sudo ./libgdiplus_downgrade.sh
 +</code>
  
config/keepass.1685357732.txt.gz · Last modified: by 127.0.0.1