I'm looking for a way to take screenshots either with some utility or programmatically using API. The application I'm using has that functionality (written in Java, AWT library) but it doesn't work since WebOS seem to be using Wayland, and not X11. The following error is logged:
java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
I also considered using Xwayland in order to have X11 compatible interface, though couldn't find any related information and if capturing screenshots is possible with it.