Binary package “vncsnapshot” in ubuntu jammy
A utility that takes JPEG snapshots from VNC servers
VNC Snapshot is a command-line program for VNC. It will save a JPEG
image of the VNC server's screen.
.
To use this you must be able to connect directly to the VNC server via
a TCP connection. It does not yet work for connections tunnelled over
SSH.