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.
[tags]screenshots, screenshot, linux, ubuntu, import, imagemagick[/tags]
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:
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:
Oh, nice! I’ll keep that in mind for the future. :)
Nice, I’ve looked all over for something like this. Terrific
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!
Interesting article! One good thing to do should be mapping a key to this command. I should try tonight ;)
Thanks for sharing.
I actually know this because I sometimes forgot to add #/usr/bin/python to python scripts that used import and then ran it like ./python-script and got strange cursor and then it saved something like system*.ps. Later I actually have used only import to save screenshots.
another way is : Alt+SysRq.