j'ai ecri un petit script, pour exporter la variable DISPLAY
à chaque ssh:
#Declare automatique DISPLAY
CONS=$(tty | sed "s~/dev/~~g")
ATIP=$(who | grep $CONS | awk '{print $6}' | sed "s~(~~g" | sed "s~)~~g" | sed "s~::ffff:~~g" )
echo "DISPLAY=$ATIP:0"
export DISPLAY=$ATIP:0
unset CONS
unset ATIP
Je l'ai mise sur la machine distante, un solaris.
Quand, depuis ma machine locale je fais:
scp kowalsky@192.168.0.124:/etc/hosts /etc/hosts
j'ai un retour du type:
grep: can't open protocol error: bad mode
You have mail (…)
Forum Programmation.shell scp lit .bashrc...?
28
déc.
2005