How to take screenshot under Wayland?

Suliman picture Suliman · May 25, 2014 · Viewed 10k times · Source

A want to write simple tool that will take screenshots at Wayland. Am I right with my understanding that it would be completely different from Xorg? Could anybody give me any examples?

Answer

lord.garbage picture lord.garbage · Aug 31, 2014

Your question is a bit underspecified. You don't need to write a tool as long as you use the reference compositor Weston for Wayland. It has this feature built in. You can use Super + S to take a screenshot and Super + R to record a video in *.wcap form which you can then convert to a *.webm video.

If you should really be interested in writing such a tool then you should look at Weston's source code here: http://cgit.freedesktop.org/wayland/weston and find the relevant parts.