As Linux distros evolve and move away from Xorg, we probably will need to find a way to add Wayland support for taking screenshots here, as presumably the existing X-assumption will no longer be valid.
Believe Fedora 41/42 have already gone this direction, as with Arch - perhaps others will follow and remove X support.
There appear to be a number of libraries in go that implement the Wayland protocol, but not sure how to go about taking screenshots, and there are some posts online indicating some complexity of doing this with Wayland due to its security model.
Perhaps "wlr" screencopy protocol and/or XDG Desktop Portal and/or communication via dbus are necessary?
As Linux distros evolve and move away from Xorg, we probably will need to find a way to add Wayland support for taking screenshots here, as presumably the existing X-assumption will no longer be valid.
Believe Fedora 41/42 have already gone this direction, as with Arch - perhaps others will follow and remove X support.
There appear to be a number of libraries in go that implement the Wayland protocol, but not sure how to go about taking screenshots, and there are some posts online indicating some complexity of doing this with Wayland due to its security model.
Perhaps "wlr" screencopy protocol and/or XDG Desktop Portal and/or communication via dbus are necessary?