evolution calls gpg2 in a way where stdin is redirected so there is no tty.
(example echo test | gpg2 --sign --armor -u $USER). If there is GUI pinentry
installed it properly asks for the passphrase. However if it is not installed
the error message is quite cryptic:
gpg: signing failed: Inappropriate ioctl for device
Would it be possible to detect such situation and provide more meaningful error
message? Such as 'Missing tty for displaying passphrase entry.'