[Pkg-xfce-devel] Bug#791378: Bug#791378: conflicts with /etc/X11/Xsession.d/90gpg-agent and unsets GPG_AGENT_INFO

Yves-Alexis Perez corsac at debian.org
Sat Jul 4 19:19:11 UTC 2015


On ven., 2015-07-03 at 23:15 -0400, Joey Hess wrote:
> gpg-agent: a gpg-agent is already running - not starting a new one
> 
> (xfce4-session:10715): xfce4-session-WARNING **: gpg-agent returned no PID in the variables
> 
> I noticed there's a /startup/gpg-agent/enabled to control whether xfce4-session
> does this, and after manually adding that setting in the xfce
> configuration editor, and setting it to false, the problem went away
> on next login.

Well, this variable is not set by default, and the code explicitly
checks for TRUE so you seem to had it set to TRUE somewhere.
> 
> So, xfce4-session is clearly stomping on the toes of
> /etc/X11/Xsession.d/90gpg-agent. Without reading its source code, but just
> looking at strings, I hypothesize it's running gpg-agent, expecting some
> output that it no longer produces, and then clobbering the already correctly
> set GPG_AGENT_INFO.

Well, if you read the code [1], xfce4-session only does that if:

- /startup/gpg-agent/enabled is set to TRUE
- gpg-agent binary is found
- GPG_AGENT_INFO is set
- the pid extracted from GPG_AGENT_INFO exists

The problem lies there, I think. With gpg-agent 2.1 GPG_AGENT_INFO is
not needed anymore (it always use the standard path), but 90gpg-agent
sets it for compatibility with gpg 1. It sets it to $GNUPGHOME/S.gpg
-agent:0:1 so there's definitely no PID there to ping. xfce4-session
then considers the gpg-agent dead, and tries to start another one.

I'm not sure how you're supposed to ping gpg-agent to check if it
works, but in any case this code will be obsolete once gpg 2.1 is the
default (I sincerely hope it'll happen soon).

In any case, I'll forward that to upstream.

[1] https://sources.debian.net/src/xfce4-session/4.12.1-3/xfce4
-session/xfsm-startup.c/#L197
-- 
Yves-Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20150704/5fc58e87/attachment.sig>


More information about the Pkg-xfce-devel mailing list