Remote PC without Monitor: RobotDesktop: checkMousePosition

Asked by Simon Fong

I have a NUC running in Win10 without monitor trying to run sikuli. When I remotely connected to it, sikuli works fine. After I have disconnected Remote Desktop, Sikuli doesn't run until I reconnect with Remote Desktop. The error message is as follows:

[error] RobotDesktop: checkMousePosition: should be L[1664,141]@S(0) - but is not!
Possible cause in case you did not touch the mouse while script was running:
 Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.

And this message remains when sikuli is running as admin. Is this fixable? any suggested workaround?

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

SikuliX needs a system with either a real screen (logged in) or some fake screen (X-Windows, xvfb, HDMI-emulator, ...) to work (a requirement of the internally used Java AWT Robot).

So it seems, that an active Remote Desktop satisfies the requirement, as long as it runs.

With my MacMini (the Mac NUC ;-) I solve this problem with a HDMI Screen emulator.

There is currently no SikuliX option to workaround this requirement.

Revision history for this message
Simon Fong (simonfongnt) said :
#2

i search around and find something like HDMI Dummy Plug. Do you think it'd be useful?
And when i tried to connect with Teamviewer, the desktop resolution is lower than RDP desktop.
After I'd changed the resolution, the sikuli could work with teamviewer.
then now the "logged in" issue, seem to me Lock Screen can be disabled in Win10 yet the NUC cannot be rebooted until weekend.

Sorry that if this question is more to Win issues and you are using Mac...i wish there is some simple config to fix this issue.

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

I am on Windows as well, but I do not have a NOC.
I mentioned my macMini, because this was the motivation for Intel to create the NOC line ;-)

To be clear: A machine (whatever system) that should run SikuliX workflows using features like find(), click(), type() must have something attached or emulated that is accepted by Java AWT as a screen device (not-headless mode). On this screen the app under test must be visible at runtime (no locked screen).

HDMI Dummy Plug: yes, this should solve it (emulates a screen with FullHD resolution).

Revision history for this message
Simon Fong (simonfongnt) said :
#4

good news to me is, seem my NUC can emulate a screen. (maybe win10, idk)

I disabled Sign-in options and set it never turn off and sleep in Win10.

After I had teamviewer connected, I had to adjust the screen resolution from 1024 back to 1440, then sikuli works even after I disconnect & reboot it. (seem this was the actual problem...)

However, I have to adjust some of the images to lower accuracy via teamviewer. I suppose I can live with that.

Thanks for your advice. I will buy a Dummy plug in the meantime for in case...

Revision history for this message
Simon Fong (simonfongnt) said :
#5

Thanks RaiMan, that solved my question.