doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
620 stars 83 forks source link

Add environment variable to control which pinentry program is used #39

Closed djmattyg007 closed 3 years ago

djmattyg007 commented 3 years ago

On Arch Linux, /usr/bin/pinentry looks like so:

#!/bin/sh

test -e /usr/lib/libgtk-x11-2.0.so.0 && exec /usr/bin/pinentry-gtk-2  "$@"

exec /usr/bin/pinentry-curses "$@"

If this runs on a system with a desktop environment installed, it will always try to run the graphical pinentry program. This will happen even if I'm SSH'd into the system.

GnuPG has a roundabout way of forcing use of the CLI for pinentry, by setting GPG_TTY=$(tty). I'm not sure of exactly how this logic works, but it does seem to work reliably. It would be ideal if rbw had a similar mechanism.

doy commented 3 years ago

fixed in 604e09e

djmattyg007 commented 3 years ago

Thank you so much :)