wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

keys and screen issues when returning from pinentry-curse #30

Closed frediz closed 6 years ago

frediz commented 6 years ago

Hi, thanks for that awesome mail client. I've not found any other ncurse notmuch capable client as fast as this one since years.

One issue I have when signing my mails is that a curses gui pops up (I guess it's pinentry-curses that gets called by gpg) to ask my private key password, and when I hit Enter, it closes and bower gui comes back, but :

  1. the display is not very clean, which I workaround with ctrl-L
  2. up and down arrow keys get lost : I can't use them anymore. Though I can use j and k but I'm still not used to them in bower, though using them constanly in vim .. lol

Nothing blocking, I just wanted to share,

F.

wangp commented 6 years ago

I couldn't get notmuch working with pinentry-curses. Does pinentry-gtk-2 work for you?

frediz commented 6 years ago

Hi @wangp , what do you mean by couldn't get working ? I guess pinentry-gtk-2 would work and not screw up my terminal, but I'd prefer staying in my terminal. Though, it'd be interesting to test with pinentry-tty ... Also, this actually makes impossible for me to use UP/DOWN keys in another use case : when using "l" and change to another search .. which is more embarrassing.

F.

frediz commented 6 years ago

After testing, it's worse with pinentry-tty : I don't even get it to continue after I hit Enter after my password. It keeps asking the password "Password: "... I'll stick to pinentry-curses and try to workaround. F.

wangp commented 6 years ago

Can you try the gpg-pinentry-curses branch? It should help for signing or signcryption.

I haven't been able to get pinentry-curses to pop up for decryption. If that's possible then we will need to save/restore the terminal state for any notmuch call that might require decryption.

frediz commented 6 years ago

Hi @wangp thanks for your help : the gpg-pinentry-curses branch actually fixes the arrows after pinentry-curses, nice! I had the same issue as you though for decryption : no pinentry-curses pop-up and "decryption failed" message. After some stracing, and launching notmuch --decrypt manually, I figured out that this is a miss-configuration issue : that is, you need export GPG_TTY=$(tty) (through shell-rc file) as advised in gpg-agent man page. With GPG_TTY properly set, decryption works flawlessly in bower with pinentry-curses asking for password, decrypted message being displayed and arrows working too, back to the index. Great! thanks

F

wangp commented 6 years ago

Thanks for that information.

I've updated the gpg-pinentry-curses to prepare for pinentry-curses being called in other places, hopefully without impacting on users who don't use pinentry-curses (no flash of the screen every time we call notmuch which might need to decrypt).

wangp commented 6 years ago

Merged to master.