X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=xinitrc;h=f262caeb25e969f30054ba64f5dab1457326b369;hb=00b1df174cf33da23c6084c38a607b5371d19355;hp=e9d81ad3eee9d9465be76ac16af2660d66eeacf6;hpb=ebcd4291a5accbd3e01a691c20c5c4963d13415d;p=config%2Fdotfiles.git diff --git a/xinitrc b/xinitrc index e9d81ad..f262cae 100755 --- a/xinitrc +++ b/xinitrc @@ -42,7 +42,7 @@ error() { xmessage "$@" & else # Log message to a file which is displayed by my Zsh setup on startup. - echo "$@" >> "$HOME/.xinitrc.errors" + echo "$*" >> "$HOME/.xinitrc.errors" fi } # Save PID of the most recently started background process. Used to terminate @@ -74,9 +74,11 @@ if test -f "$HOME/.xinitrc.local"; then fi -# Start ssh-agent if we have private keys, thanks to +# Start ssh-agent if no agent is running and we have private keys, thanks to # http://code.haskell.org/XMonadContrib/scripts/xinitrc (read on 2011-06-19). -if test -x /usr/bin/ssh-agent && test -f "$HOME/.ssh/id_rsa"; then +if test -z "$SSH_AGENT_PID" \ + && test -x /usr/bin/ssh-agent \ + && test -f "$HOME/.ssh/id_rsa"; then # -s to force bourne shell output. This file is a bourne shell script even # if the environment might suggest otherwise. eval `/usr/bin/ssh-agent -s` >/dev/null