From: Maximilian Friedersdorff Date: Mon, 28 Nov 2016 11:01:00 +0000 (+0000) Subject: Launch gpg-agent with X X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=51dee527665595592f8c1e18a1a5a2561865d823;p=max%2Fdotfiles.git Launch gpg-agent with X --- 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 -