I am very new to Ubuntu and I basically use it to run an .exe in a Virtual Desktop. For automation purposes I created 3 commands that will make an .exe run, fill-in password, and hit Enter, so the program launches.
Code:
DISPLAY=:1 wine /path_to_exe/program.exe
DISPLAY=:1 xte 'str mypassword'
DISPLAY=:1 xte 'key Return'
With these 3 simple commands from an external SSH Terminal session, the program is executed in the Virtual Desktop, password is filled-in and then launches normally. Issue is I cannot combine these 3 commands into a crontab nor a script to work toghether.
I tried different scenarios in Terminal which don't work.
Code:
command1;sleep 5;command2;sleep 2;command3
command1 && sleep 5 && command2 && sleep 2 && command3
command1; command2; command3
I also created a script.sh with following code, which would also not work.
Code:
#!/bin/bash
DISPLAY=:1 wine /path_to_exe/program.exe
sleep 5
DISPLAY=:1 xte 'str mypassword'
sleep 2
DISPLAY=:1 xte 'key Return'
Bookmarks