Problems finding keyring with GnuPGME

mconahan at mconahan at
Tue Apr 12 19:32:04 CEST 2005

harry_b at wrote:

> Hi,
> this should be quite easy - just set the environment variable 
> GNUPGHOME before you start your process and all should be fine.
> It defaults to '$HOME/.gnupg' I think but you can set it to whatever 
> you want. The directory should not be readable by anybody else than 
> the current user.
> HTH, Harry
> --On Tuesday, April 12, 2005 09:55:47 -0400 mconahan at 
> wrote:
>> Hi everyone,
>>     I created a Linux application that uses GnuPGME.  The app is started
>> by a server process, and as a result is having troubles accessing PGP
>> keyrings.  This is probably a permissions thing, as I installed GnuPG as
>> the root user; the API (GnuPGME) is probably looking for the keyring at
>> /root/.gnupg/.
>> FYI, if I run my app as root on the command line, everything works fine;
>> however, I need to start this process with a server.
>> I am currently looking at three options: 1) update the GnuPGME keyring
>> functions that I use to allow me to specify arbitrary keyrings of my
>> choice, 2) investigate what user process is running my app, and create a
>> home directory for it with keyrings and all, or 3)investigate if 
>> there is
>> some undocumented function  in GnuPGME that I can use to help me specify
>> the keyring of my choice.
>> Any help/advice provided by anyone would be greatly appreciated.
> -- 
> 1024D/40F14012 18F3 736A 4080 303C E61E  2E72 7E05 1F6E 40F1 4012
> Version: 3.12
> GIT/S dx s: a C++ ULS++++$ P+++ L+++$ !E W++ N+ o? K? !w !O !M
> V PS+ PE Y? PGP+++ t+ 5-- X+ R+ !tv b++ DI++ D+ G e* h r++ y++
> ------END GEEK CODE BLOCK-----
> -

Thanks!  Your solution worked like magic.

More information about the Gnupg-devel mailing list