I am making a panel to display a kiosk on the Internet using raspberry pi, and I want to send some touches to the browser window 2 minutes after downloading it. The script sends the login information to the web server.
I have a script that sends keystrokes that work fine from the telnet console:
#!/usr/bash
username="username"
password="password"
echo "Setting Display"
export DISPLAY=:0
echo "Sending Username"
for char in $(sed -E s/'(.)'/'\1 '/g <<<"$username"); do
xdotool key $char
done
xdotool key Tab
echo "Sending Password"
for char in $(sed -E s/'(.)'/'\1 '/g <<<"$password"); do
xdotool key $char
done
xdotool key Return
echo "Waiting 5 Seconds"
sleep 5
echo "Setting Remember Password"
xdotool key Tab
xdotool key Tab
xdotool key Return
echo "Finished"
I tried to add bash /home/pi/logon.shrc.local to the file - but it does not send keystrokes in the browser?
Does anyone know why this would be? As I said, it works fine in the telnet window if I run the script, but it does not work when it starts from boot.
sleep 120 , , - , script rc.local, sleep, . script.
?