Note: a screen capture is also named a snapshot or a screenshot capture.
1. Screen capture without a keyboard
The Weston debug tool named weston-screenshooter is used to make screen captures in PNG format. This tool can be used only with a Weston configured in debug mode. You can add the following line to the file named "/etc/default/weston" to enable the Weston debug mode:
OPTARGS=--debug # if OPTARGS variable was already there, append "--debug" to it, for instance # OPTARGS=--something # becomes # OPTARGS=--something --debug
The Weston debug mode will be taken into account after a stop/start of the Wayland Weston service, please refer to How to stop and start Weston article.
As Weston debug mode is now enabled, you can perform a screen capture with the following command:
weston-screenshooter
The captured picture is named wayland-screenshot-*.png (PNG format) and stored in "/home/weston" or "/home/root" or "/" depending on the Weston configuration.
ls /home/weston
typescript wayland-1 wayland-1.lock wayland-screenshot-2023-10-11_19-55-31.png weston-previous.log weston.log
You can copy the screenshot from the board to the host PC in the <file-path> directory (for example with the scp command).
scp root@<ip address>:/home/weston/wayland-screenshot-*.png <file-path>/
2. Screen capture with a keyboard
See Weston keyboard shortcut for screenshot capture.