Open an App linux

Asked by Varun Umesh

Hi all,

I am trying to open a custom software application on linux via Sikuli.
But traditional way"some app") and also with the path to the app.
Its giving the following error:

[error] findWindow:
[error] error in command [wmctrl, -lpGx]
[errout] X Error of failed request: BadWindow (invalid Window parameter)
  Major opcode of failed request: 20 (X_GetProperty)
  Resource id in failed request: 0x2e00169
  Serial number of failed request: 15
  Current serial number in output stream: 15

But when I open the app manually Sikuli performs as expected.

OS : Fedora 33
Sikuli: 2.0.4

Thanks in advance.

Varun Umesh

Question information

English Edit question
SikuliX Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :

please paste the code snippet you are using

Revision history for this message
Varun Umesh (varunumesh) said :

myApp = App.("/home/tm/Documents/mvts/MCVTS/bin/MCVTS")

I have tried with both .exe and .app extentions.
App type : executable (application/x-executable)

I have also tried with these syntax:

myApp = App("/myapps/")
myApp = App(r"c:\myapps\someApp.exe")
myApp = App(r'"c:\folder with spaces\someApp.exe"')

Revision history for this message
Varun Umesh (varunumesh) said :

myApp = App("/home/tm/Documents/mvts/MCVTS/bin/MCVTS")

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

When is used, SikuliX internally waits until the program is started and then tries to identify the main program window.

In your case the program start as such seems to work, but the subsequent findWindow has problems using the command
wmctrl -lpGx
which should produce a list of all open windows.

So you might track the problem down, by opening the program manually and then in a terminal issue the command wmctrl -lpGx, to see what happens.

If this does not reveal a solution, you have to start the program manually outside the script or use run(someCommand) in the script.
Be aware: someCommand must not wait for anything, but issue something to start the app and then immediately come back.

Can you help with this problem?

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

To post a message you must log in.