#!/bin/bash PINENTRY='/usr/bin/pinentry-gtk-2' if [[ x"$KDE_FULL_SESSION" = x"true" ]]; then # KDE if [[ x"$KDE_SESSION_VERSION" = x"4" ]]; then # KDE4 PINENTRY='/usr/bin/pinentry-qt4' elif [[ -z "${KDE_SESSION_VERSION}" ]]; then # KDE3 PINENTRY='/usr/bin/pinentry-qt' fi elif [[ -z "${DISPLAY}" ]]; then # We are not in a graphic session PINENTRY="/usr/bin/pinentry-curses" # Assume that ncurses is installed fi exec "$PINENTRY" "$@"