summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgpg-agent.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpg-agent.sh b/gpg-agent.sh
index 8f5cd7d..cd8a866 100755
--- a/gpg-agent.sh
+++ b/gpg-agent.sh
@@ -24,4 +24,7 @@ initgpg(){
export SSH_AUTH_SOCK
export SSH_AGENT_PID
}
-initgpg
+
+if [[ -n $DISPLAY ]]; then
+ initgpg
+fi