I was looking for a way to create screenshots of my pinephone. After reading this nice article it was clear that grim can do the job.
grim(1) General Commands Manual grim(1) NAME grim - grab images from a Wayland compositor DESCRIPTION grim [options...] [output-file] SYNOPSIS grim is a command-line utility to take screenshots of Wayland desktops. For now it requires sup‐ port for the screencopy protocol to work. Support for the xdg-output protocol is optional, but im‐ proves fractional scaling support. grim will write an image to output-file, or to a timestamped file name in $GRIM_DEFAULT_DIR if not specified. If $GRIM_DEFAULT_DIR is not set, it defaults to $XDG_PICTURES_DIR. If output-file is -, grim will output the image to the standard output instead. OPTIONS -h Show help message and quit. -s <factor> Set the output image's scale factor to factor. By default, the scale factor is set to the highest of all outputs. -g "<x>,<y> <width>x<height>" Set the region to capture, in layout coordinates. If set to -, read the region from the standard input instead. -t <type> Set the output image's file format to type. By default, the filetype is set to png, valid val‐ ues are png, jpeg or ppm. -q <quality> Set the output jpeg's filetype compression rate to quality. By default, the jpeg quality is 80, valid values are between 0-100. -o <output> Set the output name to capture. -c Include cursors in the screenshot. AUTHORS Maintained by Simon Ser <email@example.com>, who is assisted by other open-source contributors. For more information about grim development, see https://github.com/emersion/grim. 2020-01-21 grim(1)
Because my pinephone is running Debian I’ve installed grim with apt.
sudo apt install grim
I’ve also installed openssh-server on my pinephone, so I can log in on my pinephone over ssh.
To take a screenshot, I log in (ssh) from my desktop to my pinephone. On my desktop I type
which creates a screenshot of the pinephone with a filename like 20200502_22h23m07s_grim.png: