X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=customizing%2Ffred%2Fscripts%2Fssh.sh;h=13d57fa3cfceea4126362bc2ef8bdec961fcc7df;hb=463f8b3f881cd5eba2fe670f8d38f4793eac129e;hp=660071ec7e620dc2b3814062c09b457f9cad5bf6;hpb=798d51d4a8fedfdaf55305f64c97ce0aa31c5ad3;p=feisty_meow.git diff --git a/customizing/fred/scripts/ssh.sh b/customizing/fred/scripts/ssh.sh index 660071ec..13d57fa3 100755 --- a/customizing/fred/scripts/ssh.sh +++ b/customizing/fred/scripts/ssh.sh @@ -2,18 +2,30 @@ # wraps our calling the secure shell and lets us pick our credentials. -source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" +source "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/pick_credentials.sh" -# save the former terminal title if we're running in X. +# save the former terminal title if we're running in X with xterm. prior_title= -if [ ! -z "$DISPLAY" ]; then +if [ "$TERM" == "xterm" ]; then prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" fi +# force the TERM variable to a more generic version for other side. +# we don't want the remote side still thinking it's running xterm. +export TERM=linux + +#hmmm: it would be good to set an interrupt handler here and +# trap ctrl-c, since otherwise we are getting exited from and losing a chance +# to reset the terminal title. this actually happens a lot, since some X11 +# or other background process is left running and the ssh never actually quits, +# forcing one to hit ctrl-c. + if [ ! -z "$keyfile" ]; then - \ssh -i "$keyfile" -X -C -c blowfish-cbc $* + \ssh -i "$keyfile" -X -C $* +#-c blowfish-cbc else - \ssh -X -C -c blowfish-cbc $* + \ssh -X -C $* +#-c blowfish-cbc fi if [ $? -eq 0 ]; then