Screen goes "black" in virtual machine

Guys we have a problem here for some time.
For some reason when we run a "runnable jar" in a VM while the connection is open(while remote desktop is open) its works fine!
But when I close the connection and let the automation works, its stop to find images and return black screens on our prints.

You guys know how to solve this? I saw some other people with almost same problem, but only when using more than one screen or something like that.

We use Windows 10 on VM. I tried to run this creating the "runnable jar" from Sikulix version 1.1.3 and the last one 2.0.5. I didn't try to run using the IDE, but probably the result is the same.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Apparently only with RDP active you have a "real" screen in the VM.
Without the RDP there seems to be an inactive screen (like logged out) on which SikuliX (Java Robot) cannot act.

Take care, that somehow there is a screen active, while the script is running.

May be some fake-screen (like xvfb on Linux) is a possible solution.

Revision history for this message
Patrick Geovani Francisconi Zerbinatti (pzerbinatti) said :
#2

Right. So, I really need something to keep the screen active.

These "Java Robot" is the "java.awt.Robot" ?

You say about xvfb. The idea is just find something that open a RDP and stay open?

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

So, I really need something to keep the screen active.
--- YES

These "Java Robot" is the "java.awt.Robot" ?
--- YES

You say about xvfb. The idea is just find something that open a RDP and stay open?
--- RDP or something that keeps an active screen open (not locked)

Revision history for this message
Patrick Geovani Francisconi Zerbinatti (pzerbinatti) said :
#4

Thanks RaiMan, that solved my question.