Triggering a script over SSH on Ubuntu VM

Asked by worm

I set up an Ubuntu Server 12.04 VM and installed the ubuntu-desktop package (the "Unity" graphical environment).
I also set up the Sikuli environment and wrote a Sikuli test that is supposed to open a RDP connection with some remote VM and interact with it : https://paste8.com/iIuCCMHi

- If I connect to the Ubuntu VM with my VNC client from my personal computer and launch the Sikuli test directly, it runs successfully.

- Now if I connect to the Ubuntu VM again but this time using SSH and launch the Sikuli test, it was first failing because it couldn't find the X server. So I wrote a bash script that launches the X server first so the Sikuli test can be started properly : https://paste8.com/Psjfcv5j

My intent is to schedule the execution of this script periodically using a cron job for example.

Here's the output though:

[log] openApp: rdesktop -u 'myuser@mydomain' -p 'mypassword' -g 1024x768 myremoteaddr
[log] App.open rdesktop -u 'myuser@mydomain' -p 'mypassword' -g 1024x768 myremoteaddr(27278)
[error] script stopped with error in line 2
[error] FindFailed ( can not find startbutton.png on the screen. )
[error] --- Traceback --- error source first
line: module ( function ) statement
58: Region ( wait ) Line 1574, in file Region.java
[error] --- Traceback --- end --------------

I guess Sikuli is not able to reach the screen content somehow. Do you know any workaround?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
worm (rom-seguy) said :
#2

Nevermind.

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

… and what was the solution?

Revision history for this message
worm (rom-seguy) said :
#4

None, I didn't manage to solve the problem and set up a physical machine for further testing.

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

so I set this to answered to keep it open.

I plan to dive deeper into this remote business later the next months.

Can you help with this problem?

Provide an answer of your own, or ask worm for more information if necessary.

To post a message you must log in.