From: Amin Bandali Date: Thu, 4 Jul 2019 17:00:47 +0000 (-0400) Subject: emacs: try out pinentry X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/9fc30d4c309798172566b38aae0151da1d555379?ds=sidebyside;hp=05068e71fa902203f30133006ad20481887f8cff emacs: try out pinentry setting pinentry--socket-dir is needed because /tmp/emacs1000 is a symlink on systemd systems and doesn’t pass server-ensure-safe-dir. --- diff --git a/.config/getmail/getmailrc b/.config/getmail/getmailrc index 60ad43d..e89702a 100644 --- a/.config/getmail/getmailrc +++ b/.config/getmail/getmailrc @@ -2,7 +2,7 @@ type = SimplePOP3SSLRetriever server = fencepost.gnu.org username = bandali -password_command = ("gpg2", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg") +password_command = ("gpg", "--no-tty", "-q", "-d", "/home/amin/.passwd/gnu.gpg") port = 995 use_apop = True diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 535e7c5..f5e87ec 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -295,7 +295,19 @@ For disabling the behaviour for certain buffers and/or modes." :config (pixel-scroll-mode 1)) ;; ask for GPG passphrase in minibuffer -(setq epg-pinentry-mode 'loopback) +(use-feature epg-config + :defer 0.4 + :custom + ((epg-gpg-program (executable-find "gpg")) + (epg-pinentry-mode 'loopback))) +(use-feature epg + :after epg-config) +(use-package pinentry + :demand + :after (epg server) + :config + (setq pinentry--socket-dir server-socket-dir) + (pinentry-start)) ;; useful libraries (require 'cl-lib) diff --git a/.emacs.d/straight/versions/default.el b/.emacs.d/straight/versions/default.el index df62b3a..af4b551 100644 --- a/.emacs.d/straight/versions/default.el +++ b/.emacs.d/straight/versions/default.el @@ -79,6 +79,7 @@ ("password-store" . "5a52772156b44ef9785e91ab78ab2e1c3b1e510e") ("password-store-otp.el" . "1819cd88463cd98a5be9a63273b09202dc2bba63") ("pdf-tools" . "db7de3901ae0e55f6ab8cf9baec257f706c3d16e") + ("pinentry" . "cd942f755c38a7ac270ce858bb887ebdd59edd26") ("pkg-info.el" . "76ba7415480687d05a4353b27fea2ae02b8d9d61") ("popup-el" . "80829dd46381754639fb764da11c67235fe63282") ("projectile" . "71a01f409a319d57eb3832e93e8a412fbc9d7a65") diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf index 9fd7c4f..6b5bd7d 100644 --- a/.gnupg/gpg-agent.conf +++ b/.gnupg/gpg-agent.conf @@ -4,5 +4,6 @@ max-cache-ttl 43200 default-cache-ttl-ssh 10800 max-cache-ttl-ssh 10800 +# allow-emacs-pinentry allow-loopback-pinentry pinentry-program /usr/bin/pinentry-gnome3