Take a screenshot in Plan9

note, May 10, 2023, on Mitja Felicijan's blog

Take a screenshot in Plan9. This applies to Plan9 and 9front. This will take a screenshot of the screen and output it to /dev/screen. You can then use topng to convert it to a png image.

# Instant screenshot.
cat /dev/screen | topng > screen.png

# Delayed screenshot (5 seconds).
sleep 5; cat /dev/screen | topng > screen.png


Other notes