0

*By pass I meant pass for Unix, the standard password manager.

I set up GnuPG to use pass and it works just fine. Whenever I need to enter my password, however, I have to enter it in a popup. This means I can't use pass on the TTY (or decrypt anything). A while ago, I found a solution that allowed me to type in my password from the TTY to decrypt my files. Unfortunately, this meant I could not use pass from dmenu, or run any decryption related scripts in the background. Is there a way I can set up GnuPG to accept input from the command line when necessary, and through a popup otherwise? In addition, is there a way to customize the look of the GUI popup? I want to make it transparent and smaller.

Distro: Arch Linux

WM: DWM

Related software: gnupg, pass

If there is a configuration file I need to be editing please let me know where it is located. I completely forgot the config I edited that allowed me to enter my password from the tty. (That even still wasn't a perfect solution but there may have been something else in the config that would've helped me)

  • You can try the answer from here https://superuser.com/a/521027/919826 to force console mode pinentry – admin Oct 09 '20 at 18:52
  • If I do this, I cannot sign in from any scripts or anything that's not the terminal. I want to be able to sign in from pass for firefox, passmenu, etc. – KNOB Personal Oct 11 '20 at 14:38

2 Answers2

0

Change the symbolic link /usr/bin/pinentry to /usr/bin/pinentry-curses or /usr/bin/pinentry-tty (install one of them if missing)

OR

Change in the config file ~/.gnupg/gpg-agent.conf: set pinentry-program to one these.

Olivier
  • 111
  • 2
  • If I do either of these, I can't use decryption in X anymore. I need to be able to decrypt things both in X and in the tty. – KNOB Personal Mar 11 '21 at 05:05
0

Put this in a script, and add it to ~/.gnupg/gpg-agent.conf

#!/bin/sh
tty -s && exec pinentry-tty "$@" || exec pinentry-x11 "$@"
Shanness
  • 101
  • 1