[1.1.0] CentOS7: wmctrl not working with plain X-session

Asked by Marcel Hecko

Trying to run Sikuli 1.1.0 on CentOS7

Managed to get all required RPMs installed an running the following on a remote server forwarding the X session via SSH to a local Windows-based X server (XLaunch)

Managed to run the setup, after that I am getting as follows:

[sikuli@localhost src]$ ./runsikulix
running SikuliX: -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar ./sikulix.jar
[info] runcmd: lsb_release -i -r -s
[error] RunTimeINIT: fatal error: java.io.IOException: Cannot run program "lsb_release": error=2, No such file or directory
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[error] RunTimeIDE: *** terminating: command 'wmctrl' is not executable
please check the Availability!
[sikuli@localhost src]$ which wmctrl
/usr/bin/wmctrl
[sikuli@localhost src]$ wmctrl -V
1.07
[sikuli@localhost src]$

Cant really figure out this one - could this be a case of wmctrl requiring some kind of desktop environment or windows management system running? Im running raw X session - nothing on top of it and could run Setup just fine.

Thanks,
Marcel

Question information

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

the check, that fails at your side, internally is done with

wmctrl -m

which in your case terminates with an error.

... and as far as I understand, it needs some window manager to be running.

The problem for you: There is no option currently available, to switch of the wmctrl usage (only needed with the App class features).

I take this as a request bug and use this to start the nightly builds with version 1.1.1, where I will add the possibility to run without a working wmctrl (the respective App features will just do nothing in this case).

Revision history for this message
Marcel Hecko (maco) said :
#2

Yeah, the result here is as follows:

[sikuli@localhost ~]$ wmctrl -m
Cannot get window manager info properties.
(_NET_SUPPORTING_WM_CHECK or _WIN_SUPPORTING_WM_CHECK)
[sikuli@localhost ~]$ echo $?
1

Ill try to run some window manager to make this work.

Im not familiar with the internals of SikuliX - what will happen with 1.1.1 then when wmctl is not available? Which features are tied to working wmctl?

Thanks a lot!
Marcel

Revision history for this message
Marcel Hecko (maco) said :
#3

I have managet wo jur yum install icewm, started icewm WM and SikuliX 1.1.0 now runs just fine. I reckon not to actually bypass this check - just put some information into the debug logfile that WM is needed to run SikuliX - otherwise it can be really confusing if some of the features are no available in SikuliX for this particular reason.

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

Thanks.

When the fix is ready, I will give you a note so you can have a look.

Revision history for this message
Ramandeep Singh (ramandeep1991) said :
#5

[info] runcmd: lsb_release -i -r -s
[error] RunTimeINIT: fatal error: java.io.IOException: Cannot run program "lsb_release": error=2, No such file or directory

[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /common/app/jenkins/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[error] RunTimeAPI: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /common/app/jenkins/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[info] runcmd: ldconfig -p
[error] RunTimeAPI: fatal error: java.io.IOException: Cannot run program "ldconfig": error=2, No such file or directory
[error] LinuxSupport: checking: ldconfig returns error:
s
[info] runcmd: wmctrl -m
[error] RunTimeAPI: fatal error: java.io.IOException: Cannot run program "wmctrl": error=2, No such file or directory
[error] LinuxSupport: checking: wmctrl not available or not working
[info] runcmd: xdotool version
[error] RunTimeAPI: fatal error: java.io.IOException: Cannot run program "xdotool": error=2, No such file or directory
[error] LinuxSupport: checking: xdotool not available or not working
[error] RunTimeAPI: Problematic lib: /common/app/jenkins/.Sikulix/SikulixLibs_201510081336/libVisionProxy.so (...TEMP...)
[error] RunTimeAPI: libVisionProxy.so loaded, but it might be a problem with needed dependent libraries
ERROR: ...TEMP...: libopencv_core.so.2.4: cannot open shared object file: No such file or directory
[error] RunTimeAPI: *** terminating: problem with native library: libVisionProxy.so

Revision history for this message
Ramandeep Singh (ramandeep1991) said :
#6

Getting above mentioned error. Usind below mentioned dependencies. Code build in Maven with Java language.

<dependency>
   <groupId>com.sikulix</groupId>
   <artifactId>sikulixlibswin</artifactId>
   <version>1.1.0</version>
  </dependency>
  <dependency>
   <groupId>com.sikulix</groupId>
   <artifactId>sikulixlibslux</artifactId>
   <version>1.1.0</version>
  </dependency>
  <dependency>
   <groupId>com.sikulix</groupId>
   <artifactId>sikulixlibsmac</artifactId>
   <version>1.1.0</version>
  </dependency>