SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

Ubuntu 22.04: SX IDE capture screen results in black images --- workaround

Open RaiMan opened this issue 2 years ago • 3 comments

The reason behind is a known Java Robot problem with the new Wayland DisplayServerProtokoll (instead of classic Xorg). This problem is still there in Java 19.

Taken from: https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-22-04-desktop

Wayland is a communication protocol that specifies the communication between a display server and its clients, and we can choose whether to enable/disable Wayland on Ubuntu. By default the Ubuntu 22.04 Jammy Jellyfish desktop already uses Wayland but it’s also possible to load to Xorg display server instead.

The workaround is as follows: (tested by RaiMan and works)

sudo nano /etc/gdm3/custom.conf to edit the startup config and uncomment the line WaylandEnable=false

... more info under the above link.

RaiMan avatar Feb 15 '23 18:02 RaiMan

a possible way to check and workaround (from https://answers.launchpad.net/sikuli/+question/703405):

issue resolved after changing $XDG_SESSION_TYPE in my machine,

Please find the steps I have done,

  1. check which display system your ubuntu using echo $XDG_SESSION_TYPE

If above command outputs "wayland" then your system is using wayland.

To use screensharing we have to disable wayland and enable xorg(x11).

  1. Open /etc/gdm3/custom.conf and uncomment below line, WaylandEnable=false save the changes and reboot your system.

3, do. echo $XDG_SESSION_TYPE and it should display x11.

RaiMan avatar Feb 16 '23 13:02 RaiMan

So basically the workaround for lack of wayland support is to disable wayland and switch back to X11, right? Do you have any plans for including wayland support?

ralphfj avatar Aug 15 '23 14:08 ralphfj