I have this script to open a new console, ssh into a server, run a deploy command.
I pass to the script the version of the deploy
xdotool key ctrl+alt+t
sleep 3
xdotool type "ssh myserver"
xdotool key Return
sleep 10
xdotool type "password"
xdotool key Return
xdotool type "sh path-to-script/deploy.sh $1"
xdotool key Return
I have several problems with this and I allready tried to google for a solution without success.
/
its transformed to an &
. when I run the scriptCan you give me any pointer in making this work. xdotool is not mandatory, I would use whatever it works
note: I can't by pass the ssh with a command becouse the security politics of the company and also don't know how to do it if I can't the settings in myserver
Similar problem here:
http://code.google.com/p/semicomplete/issues/detail?id=13#c29
Try:
xdotool type setxkbmap de
xdotool key Return
xdotool type "sh path-to-script/deploy.sh $1"
xdotool key Return
Maybe it works better if you write a script:
#!/bin/bash
xterm -e "ssh myserver \"sh path-to-script/deploy.sh $1\"; sleep 5"
and invoke it like this:
./theAboveScript.sh &
sleep 10
xdotool type "password"
xdotool key Return