Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying for the first time to use gpg to encrypt a file with a symmetric key, but gpg doesn't seem to respond when I use the -c switch.

gpg -v -c filename

.. just doesn't seem to do anything, nor to report any error, and just hangs until I hit ctrl-c.

Any ideas?

share|improve this question

If you have DISPLAY variable set it may be used to display prompt for password in a dialog window (it may have not appeared if you have DISPLAY set to some weird value). To verify that unset the variable:


and try again.

share|improve this answer

It might be timing out checking for the gpg-agent. I have trouble with this for some commands, and you can run gpg with gpg --no-use-agent, and it will proceed.

share|improve this answer

Adding sudo before the command solved it for some reason

share|improve this answer
-1: It's never a good idea to just randomly put sudo in front of commands. – Wuffers Nov 22 '10 at 18:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.