you can try something like:
% sleep 3; import -window root shot.png
than quickly minimise terminal and invoke 3ddesk event - work out with timeing and you will shoot it.
oh. import comes from ImageMagick package. there is also excelent utility called scrot - for screenshot from CLI. BTW you are using GNOME or KDE? have you tried to just press PrtScr? it should work... :>