Linux: Quick and Dirty Way to Take Screenshots

Random linux tip - if you don’t feel like dealing with the regular KDE or Gnome based applications or mechanisms for taking snapshots of your screen, there is a simpler and quicker way. You can do it directly from the console:

import -window root screenshot.png

Of course screenshot.png is the filename you want to assign to your screenshot. It’s quick and easy, and can be triggered at any time. You can even put it into a script, or run a cron job that will take a snapshot of your current workspace at certain time interval.

The command above takes a snapshot of the whole desktop. If you want to just grab a rectangular region, skip the window parameter:

import screenshot.png

You cursor should change into a cross, and allow you to draw a rectangle over the desired area and save it as the file name you specify.

Note that you will need to have the imagemagick package installed. On ubuntu do:

aptitude install imagemagick

Make sure you have universe enabled in your apt sources.

Related Posts:

  • Name that Movie or TV Show
  • Screenshots: Why do we want to see them?
  • Convert PNG to EPS
  • Linux Trademark Issues
  • DST Readines Test for MySQL and PHP
  • Text Dumping PDF files
  • How to clean a toilet
  • To Many Linux Distros?
  • Instiki - and Instant Wiki
  • Will the MS-Novell deal tear Linux community appart?

  • 5 Responses to “Linux: Quick and Dirty Way to Take Screenshots”

    1. Gravatar Craig Betts UNITED STATES Says: Reply to this comment

      FLIPPIN AWESOME!

      Solaris is now including the import command (/usr/sfw/bin/import) which works great!

      But . . . if you are working on antique systems like me, you might not have this command at your disposal. X11 provides a method of doing this:

      xwd -root -out screenshot.x

      However, this file is in Xbitmap format, but you can easily move it to another system and use imagemagik to convert it to the desired format:

      convert screenshot.x screenshot.jpg
      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Solaris Solaris
    2. Gravatar Luke Maciak UNITED STATES Says: Reply to this comment

      Oh, nice! I’ll keep that in mind for the future. )

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Ubuntu Linux Ubuntu Linux
    3. Gravatar jambarama UNITED STATES Says: Reply to this comment

      Nice, I’ve looked all over for something like this. Terrific

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.6 on Ubuntu Linux Ubuntu Linux
    4. Gravatar Jake UNITED STATES Says: Reply to this comment

      Wow, this will be great for when I’m stuck on GNOME or the like. I’ve always just opened up the GIMP due to the lack of a ksnapshot like utility. Thanks!

      Posted using Mozilla Firefox Mozilla Firefox 1.5.0.12 on Linux Linux
    5. Gravatar jbj FRANCE Says: Reply to this comment

      Interesting article! One good thing to do should be mapping a key to this command. I should try tonight )
      Thanks for sharing.

      Posted using Mozilla Firefox Mozilla Firefox 2.0.0.7 on Windows Windows XP

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <pre lang=""> <em> <i> <strike> <strong>

    [Quote selected]