Skip to content

Instantly share code, notes, and snippets.

@microscotch
Last active January 25, 2026 13:43
Show Gist options
  • Select an option

  • Save microscotch/0ef7299cc6dc250c99e241edbdbd29c7 to your computer and use it in GitHub Desktop.

Select an option

Save microscotch/0ef7299cc6dc250c99e241edbdbd29c7 to your computer and use it in GitHub Desktop.
Keepass2 on Linux - fix missing button captions on pop-up dialogs (Yes, No, etc.) issue

Keepass2 on Linux - Fix missing button captions on pop-up dialogs (Yes, No, etc.)

Since Debian 12 (Bookworm), Ubuntu 24.04 LTS (Noble Numbat), text on some buttons is not displayed into Keepass2

Root cause

libgitplus 6.1 embeds pango which breaks some text rendering

Fix

downgrade libgidplus to 6.0.4

Remediation script

doKeepassFix.sh

Sources

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment