[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-devel
Subject:    select pinentry-curses/qt depending on situation
From:       Petr Uzel <petr.uzel () suse ! cz>
Date:       2008-11-23 16:21:11
Message-ID: 20081123162111.GB7861 () localhost
[Download RAW message or body]

Hey list!

What is the best way (if any) to select which pinentry (-curses/-qt/-gtk) to
run, depending on situation, i.e. whether X is running and whether we have tty.

What I want is to run pinentry-curses if there is tty (e.g. gpg in virtual
console), and 'graphical' pinentry otherwise (e.g. signing mail in kmail).

Now, I have a shell script named /usr/bin/pinentry, that tries to determine
which pinentry to run and then executes it. The problem is that it can only use
command line options that gpg-agent passes to pinentry. This options either
does or doesn't contain --display option, depending on whether X is running.
The rest of options (namely --ttyname) is passed to pinentry via assuan
protocol, which obviously can not be used in the process of selecting proper
pinentry. Without ttyname I can't distinguish whether I have virtual terminal
or not (calling tty -s in pinentry script does not work).

I have two questions:

1) Is there any way how to pass ttyname (and possibly other options) to
pinentry via command line arguments instead of assuan protocol?

2) More generally, is there any better way how to run various versions of
pinentry depending on situation ?


Thanks in advance,


-- 
Best regards / s pozdravem

Petr Uzel, Packages maintainer
---------------------------------------------------------------------
SUSE LINUX, s.r.o.                          e-mail: puzel@suse.cz
Lihovarská 1060/12                          tel: +420 284 028 964
190 00 Prague 9                             fax: +420 284 028 951
Czech Republic                              http://www.suse.cz

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic