Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take screenshot under Wayland? [closed]

Tags:

wayland

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?

like image 799
Suliman Avatar asked May 25 '14 14:05

Suliman


People also ask

How do I take a screenshot in Fedora?

Alt + PrtSc – Save a screenshot of the current window to Pictures. Ctrl + PrtSc – Copy the screenshot of the entire screen to the clipboard.

How do I take a screenshot of a window openly?

Copy only the image of the active window Click the window that you want to copy. Press ALT+PRINT SCREEN. Paste (CTRL+V) the image into an Office program or other application.

How do you screenshot on KDE Plasma?

Use Type: Color in the wallpaper settings to get a white background. By default, pressing Shift + Print Screen will directly take a screenshot, without Spectacle popping out.


2 Answers

Yes screenshotting works completely different under wayland than under Xorg.

By design, Wayland is a lot more secure than X11 and does not allow one application to capture the content of other applications' windows, meanignath a X11 based screenshot tool cannot work underWayland/Xwayland.

https://bugs.freedesktop.org/show_bug.cgi?id=98672

Sorry I cannot tell you how it is different, just that it is different.

like image 151
Lesmana Avatar answered Sep 27 '22 18:09

Lesmana


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.

like image 27
lord.garbage Avatar answered Sep 27 '22 19:09

lord.garbage