0

We have an application running on a EC2 Windows server that stops working as soon a remote desktop session to the server is closed. The application OCRs the actual screen while looking for different windows, menus and dialog boxes, but without an active session, windows skips rendering those things to save system resources.

This application acts somewhat like selenium, in that it assumes control of the mouse and keyboard and launches different applications. When an application is launched, it scans the screen for specific text from menus and dialogs to determine if certain windows are open.

When a remote desktop connection is disconnected, the server saves resources by not doing all the UI rendering the application expects. Thus it can't read the screen and stops working properly. Right now I just keep a remote desktop connection open 24/7 from my laptop, but the application stops working every time I close my laptop screen.

Another thing I tried was logging into an alternate Windows Server and from that server opening a Remote Desktop session into the problem server. I leave that session open, however when I disconnect from the alternate server, somehow the UI rendering issue cascades through the alternate server into the problem server.

I'm wondering if there's any way to force Windows Server to continue doing all the UI rendering as if a user was still connected, even when there are no active sessions.

Maybe another clever solution?

0

There's no way to force Windows to render the GUI without giving it an actual reason to render the GUI.

I'm not sure exactly how the AWS console works, but generally in this situation, the easiest solution would be to disable the screensaver and autolock functions, open a console session and then leave it open.

If that's not an option with AWS, the only option is to open an RDP session, and leave it open (making sure, of course, that the server isn't configured to lock the screen or disconnect the session after a period of time). Obviously, if you do this from your laptop, that RDP session will get disconnected every time your laptop disconnects from the internet (such as by sleeping or hibernating). So, run the RDP session from a desktop, server or other always-on device.

Those are your only options, short of replacing whatever lousy app it is that requires a GUI being in use to function properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.