I apologize for the dense title and question, but I’ve read through just about every existing thread that’s remotely relevant and haven’t found a solution to my specific problem.
My goal is to automate the initialization of a GUI-based app that runs on a Windows server and requires various buttons to be clicked, but I have a number of constraints that make this particularly challenging (and so far, comically complicated).
- The system that starts the app has to be triggered by a shell script on a Linux machine–this is extremely constraining but unfortunately mandatory by nature of our system.
- The only way I’ve found to automate the startup of the Win server app is to use a PyAutoGui script. This works when run on the server, but I need a way to start the script from outside the server in an automated way.
- PyAutoGUI needs a visual desktop environment to work, so just calling the python script with SSH won’t work AFAIK.
So far, I’ve managed to put together a Rube-Goldberg machine of different tools that gets me as far as automating opening an RDP window into the Windows server from the Linux machine as follows:
Original Linux program that knows when the GUI app needs to run triggers a shell script that curls an HTTP call to a Java service listening on the Linux system — The Java service then execs a gnome terminal that runs rdesktop
to open a remote connection to the Windows server.
From here though, I don’t know any elegant ways (none of this is elegant so far, I know) to invoke the python script on the Win server to actually start the app. My only idea is to use ANOTHER PyAutoGUI script run from the Linux machine to automate selecting and running the other script through the RDP window. This seems like a bridge too far at this point, so any alternative approaches (ideally using Java) to do what I want on the Windows server I’ve opened an RDP connection to would be much appreciated.
I again apologize for the incredibly disjointed problem and any better solutions/suggestions at any point are welcome.