Have you ever wondered how to take a screenshot remotely, via the command line in a Linux system? Here is a way to do it. At the bottom you can also find a script to move it to the root of your personal page (if you have) to open the screenshot in your browser.
I have a Lisp program running inside Slime (The Superior Lisp Interaction Mode for Emacs) in an emacs instance running in my office computer. It has been running for quite a few hours (days), and top still marks it as 100%... The problem: if emacs/Slime cuts the Lisp connection with the Lisp client, it goes runaway. And I needed a way to "see" if emacs was still connected. Without going there, obviously.
Remote screen-shooting via the command line is the solution. The trick: use xwd:
xwd -root -display :0.0 -out Screenshot.xwdThen ImageMagick's mogrify to turn it into something easier to open:
mogrify -format jpg Screenshot.xwdCaveats: In my case, the first two times I got a black screen. Why?
killall gnome-screensaver (or your particular instance of screen-saver)And voilà:
emacs still connected
The script to move it to your public_html folder:
xwd -root -display :0.0 -out Screenshot.xwdYou may also like some Mac/Linux related posts:
mogrify -format jpg Screenshot.xwd
chmod +x Screenshot.jpg
mv Screenshot.jpg public_html/
- Whistle control your computer (Linux&Mac)
- Calendars & emacs
- My backup script in Mac/Linux
- How to download YouTube .flv videos
- Extremely useful (mostly free) Mac applications
- MP3 to iPod audiobook: personal reminder
- Two weeks, still loving Fluxbox
- Three dee (3-dimensional file system browsers review)
- Acer Aspire One 8.9' + Ubuntu + Fluxbox
- How to get a local proxy