Run Sikuli Script on VM without RDP session open

Asked by Ben Tracy

I have created a script that opens IE and navigates through a site to download a .xls file. The script works great. The script is going to run on a virtual machine. I can leave a user logged in to the machine but the script doesn't run after i terminate the session. When i log back into the machine the user is still logged into the machine but the script has not run. Is it possible to execute a Sikuli script that will run without a rdp session open to this VM?

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
Best RaiMan (raimund-hocke) said :
#1

Sikuli scripts while running need a system, that has access to a physical monitor (no headless machines). This is not the case when shutting down the VM session.

Sikuli scripts usually make it impossible to use the machine with the physical monitor while running (mouse, keyboard and screen used by the script).

Revision history for this message
Ben Tracy (bentracy) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
daluu (cuuld) said :
#3

Just an FYI, you can run in VM w/o monitor. Best option is to install and use VNC instead of RDP. VNC = video relay of your desktop over the network. Login with VNC, start script, disconnect. VNC session not active, but since VNC relays the desktop you are already logged in from the step earlier, so automation will run. If you reconnect, you should see automation continuing to run (but not resuming) at wherever its state should be if you kept VNC connected the whole time.

It might work with RDP whether session connected or not if you use the console session 0, which is the "head" of the desktop monitor. On XP and on Win 7/Vista home versions, RDP is to console session. But on Windows 2003/8, you can only connect as session 0 using /admin or /console parameter when running RDP (i.e. mstsc /admin). You can tell what session is used by looking at Task Manager users tab when you're logged in over RDP. But I always use VNC as it always works for me.

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

@ daluu

What VNC software do you use?

Revision history for this message
daluu (cuuld) said :
#5

@RaiMan, either RealVNC or TightVNC for server on Windows. For Windows client, I typically use RealVNC. Never used with Linux and Mac yet.

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

@daluu
I already tested with TightVNC server on Win7 as service running in my Parallels 7 on Mac Lion and using the TightVNC Java Client on the Mac.
Worked fine.
I will have a look at different scenarios over the net including an Ubuntu running on a Mac in VMBox.