In a previous post, I showed how I made a plasma screen display system using shell scripts. Today I was thinking “It’d be handy to know what’s displaying when I’m not near the screens themselves” so I figured a way of getting me quick snapshots. Below is the script:
ssh user@remotehost "DISPLAY=:0.0 import -window root /home/user/Pictures/face.png; exit" &&
scp user@remotehost:/home/user/Pictures/face.png /home/local/ &&
ssh user@remotehost "rm /home/user/Pictures/face.png; exit" &&
Researching this taught me how to incorporate commands into the SSH login process itself, using quotes to contain the command. I make sure that screen 0 is used using DISPLAY and then the import command (from Imagemagick tools on the server). Then it’s a case of SCP’ing across to me locally and then using Ristretto image viewer to display it.