EasyGnuPG / egpg

Easy GnuPG, shell scripts to make GnuPG more accessible and easier to use. (Migrated to: https://gitlab.com/EasyGnuPG/egpg)
GNU General Public License v3.0
26 stars 5 forks source link

Fix pinentry configuration for GUI #73

Open dashohoxha opened 6 years ago

dashohoxha commented 6 years ago

On cmd_init we set the configuration of gpg-agent to pinentry-program /usr/bin/pinentry-tty. Maybe the initialization for the GUI case should be a bit different (for example if we run egpg gui init instead of egpg init). In this case the package pinentry-gtk2 or pinentry-gnome3 becomes a dependency. Or maybe we can add the configuration of pinentry on Setting, so that the user can choose which one to use.

diveshuttam commented 6 years ago

Few options to implement this:

1) use a custom script for pinentry which changes pinentry to the ones we require based on an environmental variable. refer this 2) use 2 different gpg-agent.conf files for gui and cli and reload gpg-agent with the specific files 3) use something like the method being used by autopin in tests: change the pinentry program line in the gpgagent-conf file (using sed) and reload agent.

PS In all these options we can offer user to specify pinentry-programs for gui and cli in config.sh