It's possible to capture a screenshot of an X session by using import(1).

(example of using it to transfer screenshot over SSH)

xwd(1) will also do it

Other methods: scrot, imlib2_grab, ksnapshot