X11 screen grabber from cmd line

Lena at lena.kiev.ua Lena at lena.kiev.ua
Fri May 10 03:47:55 UTC 2013


> Do we have something in the ports which could do a screen shoot
> of $DISPLAY, but from the cmd line of an alpha console,
> and save it as PNG or JPEG?

#!/bin/sh
xwd -display :0 | xwdtopnm | ppmtojpeg -optimize > $1.jpg

~ # pkg_which xwd
xwd-1.0.5
~ # pkg_which xwdtopnm
netpbm-10.35.89
~ # pkg_which ppmtojpeg
netpbm-10.35.89



More information about the freebsd-questions mailing list