Skip to content

Instantly share code, notes, and snippets.

@TauPan
Created February 7, 2012 10:35
Show Gist options
  • Save TauPan/1759035 to your computer and use it in GitHub Desktop.
Save TauPan/1759035 to your computer and use it in GitHub Desktop.
wrapper for pinentry which selects curses or gtk depending on latency
#!/bin/sh
if [ -n "$DISPLAY" ] && [ "$(xprintidle)" -lt 100 ]
then
pinentry-gtk-2 "$@"
else
pinentry-curses "$@"
fi
@TauPan
Copy link
Author

TauPan commented Feb 7, 2012

This works, the problem was that I have to use

echo UPDATESTARTUPTTY | gpg-connect-agent

to tell gpg-agent about the tty I want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment