In Linux, if you work with applications like claws-mail or psi, and you use encryption, you have to entry your password every time you read a new mail or receive a new chat message. This sucks really! This article describes how pinentry remembers your password for a given time.
Check your gpg.conf
vi ~/.gnupg/gpg.conf
and uncomment
use-agent
Check (or make a new) gpg-agent.conf
vi ~/.gnupg/gpg-agent.conf
and add something like
pinentry-program /usr/bin/pinentry-gtk-2 # or "pinentry-qt" if you use kde
no-grab
default-cache-ttl 1800 # your desired time in seconds
And finally start your program with the following code. I use claws-mail here.
bash -c "eval `gpg-agent --daemon` && claws-mail"