From 51dee527665595592f8c1e18a1a5a2561865d823 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 28 Nov 2016 11:01:00 +0000 Subject: [PATCH] Launch gpg-agent with X --- X/.xinitrc | 8 ++++++++ bash/.bashrc | 10 +--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/X/.xinitrc b/X/.xinitrc index 11f0213..a0cce71 100644 --- a/X/.xinitrc +++ b/X/.xinitrc @@ -54,4 +54,12 @@ feh --bg-scale ~/Pictures/background.jpg& xset -b +if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then + eval $(gpg-agent --daemon \ + --use-standard-socket \ + --write-env-file "${HOME}/.gpg-agent-info") +fi + +gpg-connect-agent udatestartuptty /bye >/dev/null + exec /usr/bin/ratpoison diff --git a/bash/.bashrc b/bash/.bashrc index c58049c..3bf2436 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -123,14 +123,6 @@ function __prompt_command() } PROMPT_COMMAND=__prompt_command + GPG_TTY=$(tty) export GPG_TTY - -if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then - eval $(gpg-agent --daemon \ - --use-standard-socket \ - --write-env-file "${HOME}/.gpg-agent-info") -fi - -gpg-connect-agent udatestartuptty /bye >/dev/null - -- 2.45.2