From 264df59e89898f1b2a8c45b2531577d2726a546e Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 31 Aug 2016 08:57:15 -0400 Subject: [PATCH] wrapped use of xprop with a check that it exists. --- customizing/fred/scripts/ssh.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/customizing/fred/scripts/ssh.sh b/customizing/fred/scripts/ssh.sh index 13d57fa3..4d006037 100644 --- a/customizing/fred/scripts/ssh.sh +++ b/customizing/fred/scripts/ssh.sh @@ -6,8 +6,11 @@ source "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/pick_credentials.sh" # save the former terminal title if we're running in X with xterm. prior_title= -if [ "$TERM" == "xterm" ]; then - prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" +which xprop &>/dev/null +if [ $? -eq 0 ]; then + if [ "$TERM" == "xterm" ]; then + prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" + fi fi # force the TERM variable to a more generic version for other side. -- 2.34.1