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
  • To Many Linux Distros?
  • Text Dumping PDF files
  • Will the MS-Novell deal tear Linux community appart?
  • Your perfect Linux Distro?
  • Katapult: Launchy/Quicksilver for Linux
  • Flash Player 9 on Linux

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

    1. Craig Betts UNITED STATES Mozilla Firefox Solaris says:

      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
      Reply  |  Quote
    2. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux says:

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

      Reply  |  Quote
    3. jambarama UNITED STATES Mozilla Firefox Ubuntu Linux says:

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

      Reply  |  Quote
    4. Jake UNITED STATES Mozilla Firefox Linux says:

      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!

      Reply  |  Quote
    5. jbj FRANCE Mozilla Firefox Windows says:

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

      Reply  |  Quote

    Leave a Reply