Ubuntu 22.04: SX IDE capture screen results in black images --- workaround
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.
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,
- 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).
- 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.
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?