From 6307db87070b841837237263a21f51cda2fe4218 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 12 Jul 2024 12:21:12 +0200 Subject: Start gpg-agent, so that it doesn't try the terminal only, and fail when stdin is something else MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- xmonad/xinit | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'xmonad') diff --git a/xmonad/xinit b/xmonad/xinit index 008f3f2..1b7bacb 100644 --- a/xmonad/xinit +++ b/xmonad/xinit @@ -26,6 +26,23 @@ if test "${SESSION}" = xmonad; then fi fi + # Start gpg-agent, so that it doesn't try the terminal only, and fail when stdin is something else + if test -x /usr/bin/pinentry-gtk2; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk2 --daemon + elif test -x /usr/bin/pinentry-gtk-2; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk-2 --daemon + elif test -x /usr/bin/pinentry-gtk3; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk3 --daemon + elif test -x /usr/bin/pinentry-gtk-3; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk-3 --daemon + elif test -x /usr/bin/pinentry-gtk4; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk4 --daemon + elif test -x /usr/bin/pinentry-gtk-4; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk-4 --daemon + elif test -x /usr/bin/pinentry-gtk; then + setsid -f gpg-agent --pinentry-program /usr/bin/pinentry-gtk --daemon + fi + # Automatically focus output when mouse is moving in root window pdeath HUP xmonad-autofocus-output & -- cgit v1.2.3-70-g09d2