Running pinentry natively under MacOS.

Benjamin Donnachie benjamin at py-soft.co.uk
Wed May 10 13:07:02 CEST 2006


Benjamin Donnachie wrote:
> 	2. Save the attached login.command file to  /opt/local/bin/login.command

Delete /opt/local/bin/login.command and instead save the attached
application into Applications.  It is a simple bit of AppleScript that
takes care of starting gpg-agent - full details at the bottom.

> 	4. Edit the file ~/.profile to include eval $(cat ~/.gnupg/.gpg-agent)

You still need to complete this step.

> 	5. The under system preferences, accounts, login items add the file
> /opt/local/bin/login.command

Instead, add attached script.

> 	6. Then logout and log back in again.  gpg-agent will automatically be
> started, and every application will be able to access it without you
> having to start a terminal first!

Alternatively, just click on "start gpg-agent".  NB you will (probably)
need to close any open Terminal windows if you want to be able to access
gpg-agent within them.

Don't forget to create ~/.MacOSX/environment.plist as per my previous
message.

> Annoyingly, I can't stop the terminal window that just hangs about when
> you log in...  Just close for now...

No more annoying terminal windows, and no more annoying issues with
login.command.

Ben


Full AppleScript listing for start gpg-agent.app:
(* Set to location of gpg-agent *)

set gpgagentProgram to "/opt/local/bin/gpg-agent"

(* Set to gpg-agent options *)

set gpgagentOptions to "--daemon --enable-ssh-support --use-standard-socket"

(* Set to location of file used to store environment
	variables for ~/.profile *)

set gpgagentEnvironment to "~/.gnupg/.gpg-agent"

(* See whether gpg-agent is already running and if so kill it *)

set gpgagentRunning to do shell script "ps -x | grep --count " &
gpgagentProgram

(* Tests indicate that script actually starts two copies of grep *)

if gpgagentRunning > 2 then
	(* display dialog "Gonna kill it" *)
	do shell script "killall gpg-agent"
end if

(* Now run gpg-agent *)

do shell script gpgagentProgram & " " & gpgagentOptions & " > " &
gpgagentEnvironment

-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Gnupg-users mailing list