A cool little command line or two.
Say you have a remote machine that you can ssh into, it is running an X server, and you want to take a screenshot of what is on screen. You will need imagemagick installed on the remote machine for the import command to work.
1. After you have ssh’d in:
1 |
DISPLAY=:0.0 import -window root /tmp/shot.png |
This will save the screenshot to the remote machine’s tmp folder. You will need to scp across to get it!
2. Before ssh’ing
1 |
ssh user@remote-host "DISPLAY=:0.0 import -window root -format png -" | display -format png - |
Replace user@remote-host with your details. The image will appear on your PC, you can then save it as required.
Both very cool