Comment 2 for bug 1886092

Revision history for this message
mvaldez (mario-mariovaldez) wrote : Re: libreoffice doesn't list gpg private key for a digital signature

On my computer (Ubuntu Mate 20.04) this problem also causes the Tool, Options dialog to hang for around 1 minute while trying to connect to the GPG agent. The /var/log/syslog file lists lots of apparmor DENIED entries and the strace of the soffice program show lots of "gpg: can't connect to the agent" errors for around one minute.

My solution was also to modify the /etc/apparmor.d/usr.lib.libreoffice.program.soffice.bin file to add to the gpg profile section (just like zunda user did):

    owner /{,var/}run/user/[0-9]*/gnupg/S.gpg-agent rw,
    owner @{HOME}/.gnupg/* rw,

(the second line seems not to be required to sign the document but is required to use the functions of the Certificate Manager, like adding new keys).