[pkg-gnupg-maint] Bug#855868: Bug#855868: GPG_AGENT_INFO and SSH_AUTH_SOCK not set in wayland sessions

rufo rufo at rufoa.com
Sun Jul 30 00:36:43 UTC 2017


Hi folks,

Perhaps the solution might involve using systemd's
environment-generators [1].  This seems to be the new preferred way to
set environmental variables like SSH_AUTH_SOCK and the replacement for
putting scripts in /etc/X11/Xsession.d/.

For example the gnupg-agent package could create the file
/usr/lib/systemd/user-environment-generators/90gpg-agent containing
something like this:


#!/bin/bash

if [ -n "$(gpgconf --list-options gpg-agent | \
      awk -F: '/^enable-ssh-support:/{ print $10 }')" ]; then
    echo SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
fi


This is what I'm using at the moment and it seems to work well.  What do
you think?

  --rufo

[1]
https://www.freedesktop.org/software/systemd/man/systemd.environment-generator.html



More information about the pkg-gnupg-maint mailing list