LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ubuntu 12.04 - how to disable GUI for gpg ? (http://www.linuxquestions.org/questions/linux-server-73/ubuntu-12-04-how-to-disable-gui-for-gpg-4175413674/)

dlugasx 06-27-2012 10:56 AM

Ubuntu 12.04 - how to disable GUI for gpg ?
 
Hi Gurus,

few minutes ago I have wrote a perl script to encrypt all tar files in the folder. Everything is fine, script running... but after execution on the screen apear stupid gpg GUI and asking me about password to gpg.

In my script I have defined password as variable. On the server without X Windows my perl script running like a charm but on Ubuntu all the time I have to close stupid GPG GUI (for 34000 files ... ). How to disable it ?

I dont get it... somebody executing command:

Code:

gpg -c filename
from command line and instead of prompt in command line You see GUI asking You about password... that sucks... mixing famous command line with dummy guis...


Please help, how to disable it ?

garr0n 08-14-2012 08:36 PM

I just had this problem. In case you still need a solution, or anyone else finds this question on a search, the solution is
Code:

gpg --batch --passphrase your_password -c file
Use -d instead of -c to decode.

Additionally, the program pinentry is responsible for the GUI prompt. It is a symlink to /usr/bin/pinentry-gtk-2, but you can also change it to /usr/bin/pinentry-curses for a curses-based interface. There might be a way to set the default pinentry program in a configuration file, I'm not sure.


All times are GMT -5. The time now is 05:41 PM.