LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-27-2012, 11:56 AM   #1
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 262

Rep: Reputation: 18
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:

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 ?
Old 08-14-2012, 09:36 PM   #2
LQ Newbie
Registered: Mar 2007
Distribution: Slackware 12.0
Posts: 20

Rep: Reputation: 0
I just had this problem. In case you still need a solution, or anyone else finds this question on a search, the solution is
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.


gpg, gui, ubuntu

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gpg / gpg-agent -- Can't connect to /root/.gnupg/S.gpg-agent jrtayloriv Linux - Security 7 10-20-2015 04:27 PM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 10:37 AM
Disable GUI veeruk101 Linux - General 7 07-27-2007 01:52 AM
GUI for GPG with clipboard flying-tuxman Linux - General 0 01-12-2006 06:22 PM
How disable GPG. Avenge19 Linux - Software 2 11-03-2004 12:15 AM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration