Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/shell/xssh/Attic/xssh.sh between version 1.5 and 1.6

version 1.5, 2002/03/16 12:25:51 version 1.6, 2002/03/16 17:17:32
Line 18  EOF
Line 18  EOF
 exit  exit
 fi  fi
   
   if [ ! "$?DISPLAY" -o -z "$DISPLAY" ]; then
           echo "DISPLAY isn't set, can't connect with $0";
           exit 1;
   fi
   
 #  #
 # Export ~/.Xauthority file to remote host  # Export ~/.Xauthority file to remote host
 #  #
 echo "Running xauth..."  echo "Running xauth..."
 #xauth extract - $DISPLAY | ssh $* xauth merge -  #xauth extract - $DISPLAY | ssh $* xauth merge -
 #ssh $* xauth add `xauth list |grep -v unix`  #ssh $* xauth add `xauth list |grep -v unix`
 XAUTH_HOST_IP=`hostname -i | awk 'BEGIN {RS = " "} {print} /^$/ {next;} ! /^127.0.0.1$/ {print}'`  XAUTH_HOST_IP=`hostname -i | awk '// { print $1 }'`
 DISP=`xauth list $DISPLAY | awk "{print \"$XAUTH_HOST_IP:0 \" \\$2 \" \" \\$3}"`  DISP=`xauth list $DISPLAY | awk "{print \"$XAUTH_HOST_IP:0 \" \\$2 \" \" \\$3}"`
 ssh $* xauth add "$DISP"  
   if [ -z "$DISP" ]; then
           echo "Somethings is wrong in your DISPLAY enviroment or ~/.Xauthority file";
           echo "Can't connect with $0";
           exit 1;
   fi
   
   ssh $* "xauth add $DISP && echo \"DISPLAYS on remote site:\" && xauth list"
   
 if [ "$?" -ne 0 ]; then  if [ "$?" -ne 0 ]; then
         echo "$0: Can't export \$DISPLAY to remote host, exiting ..."          echo "$0: Can't export \$DISPLAY to remote host, exiting ..."

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top