From: Chris Koeritz Date: Mon, 23 Mar 2015 14:57:12 +0000 (-0400) Subject: improvement for the setting back to previous window title, where we now check that... X-Git-Tag: 2.140.90~689 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=798d51d4a8fedfdaf55305f64c97ce0aa31c5ad3;p=feisty_meow.git improvement for the setting back to previous window title, where we now check that DISPLAY is set, since xprop will not have any answers for us otherwise. might should check that this is running in an xterm too, but for my usage it's always the case... --- diff --git a/customizing/fred/scripts/ssh.sh b/customizing/fred/scripts/ssh.sh index 90b0a567..660071ec 100755 --- a/customizing/fred/scripts/ssh.sh +++ b/customizing/fred/scripts/ssh.sh @@ -5,7 +5,10 @@ source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" # save the former terminal title if we're running in X. -prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" +prior_title= +if [ ! -z "$DISPLAY" ]; then + prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" +fi if [ ! -z "$keyfile" ]; then \ssh -i "$keyfile" -X -C -c blowfish-cbc $*