Monday, 30 May 2022

How can I get a screenshot on Wayland with pure Python?

As of the latest Pillow version (9.1.0), the grab() function to get a screenshot only works on X11 and not Wayland. When I disable Wayland, it works fine.

How can I get screenshot on Wayland with pure Python? Ideally the solution doesn't involve relying on other libraries.

Is this even possible for an app to get a full screenshot (including the windows of other apps) given Wayland's security model? Using scrot to get a screenshot results in a completely black image (similar to the issue here). However, gnome-screenshot works just fine so I know this is possible.



from How can I get a screenshot on Wayland with pure Python?

No comments:

Post a Comment