3

I'm in the process of remotely viewing and selecting hundreds of images, some of which are encrypted with a symmetric key. I log in to the remote desktop machine using ssh. The viewing is not fast, but bearable once the viewer is open, but every time I try to decrypt one of the encrypted files with:

gpg -d img0424.png.gpg

it takes 2 minutes for the graphical pin-entry to show! I was about to conclude the connection was broken.

How can I speed this up, or get a non-graphical version for the pin-entry? I cannot do ssh -x to disable X11 as I need it for viewing the images.

Anthon
  • 78,313
  • 42
  • 165
  • 222
Cina
  • 35
  • 5

1 Answers1

3

You can disable X for a specific command line invocation by prefixing the command line with DISPLAY=:

DISPLAY= gpg -d img0424.png.gpg

That should give you the curses based pinentry interface instead of the GUI.

But it is probably more efficient to download all the files with scp. The data volume transferred when displaying over X is likely to be more than what scp consumes.

As @Benjamin suggested, there is also a more permanent solution on superuser, where you change the pinentry program to be pinentry-curses.

Anthon
  • 78,313
  • 42
  • 165
  • 222
  • 1
    +1 for suggesting viewing the files locally instead of over SSH. perhaps you could include a permanent solution in your answer as well, as per http://superuser.com/questions/520980/how-to-force-gpg-to-use-console-mode-pinentry-to-prompt-for-passwords –  Apr 29 '16 at 13:20