24

I know how to take a screenshot, but I want to take many screenshots within a limited time (taking screenshots of a single execution of a program which I can not pause).

Is there a program that takes the "PrtScr" keyboard key in charge and just stores every screenshot without asking? The standard Ubuntu tool pops up a dialog to ask where I want to save the file, I would like a tool that doesn't ask and just saves on the Desktop or wherever as 00001.png 00002.png etc.

3 Answers 3

27

Shutter Install shutter has an option to automatically save screenshots, incrementing the filename each time.

Edit ➜ Preferences ➜ Main ➜ Save :

enter image description here

To make Shutter take the screenshots when you hit PrtScr,
go to Edit ➜ Preferences ➜ Keyboard and check the Capture checkbox:

enter image description here

If you don't want the Shutter window to pop up every time you take a screenshot, go to Edit ➜ Preferences ➜ Behavior and uncheck Present main window after taking a screenshot :

enter image description here

4
  • 1
    Shutter is wonderful. Much recommended. There is also a ppa available.
    – belacqua
    Jan 21, 2011 at 7:00
  • 3
    Great! I would also add to unckeck "Present main window after taking a screenshot" in Preferences. Jan 21, 2011 at 7:06
  • 2
    I installed Shutter, but it does not have "keyboard" tap at all. Any idea what is going on/how to fix it?
    – Funzies
    Dec 22, 2015 at 11:26
  • 2
    Now it's in System settings, under "keyboard>shortcuts>custom shortcuts>+" and run command "shutter -f" with the good key. Shutter might be very slow in ubuntu 14.04 x64 bits, I needed to edit every of its settings thereafter. Dec 27, 2015 at 6:25
5

As for scrot - in order to take screenshots more frequent then one per second I suggest using the following command bound with Key Shortcut:

scrot ~/shots/'%Y-%m-%d_%H-%M-%S.png' -e 'TMPSCRN=$f; mv $f $${TMPSCRN%.png}-`date +%3N`.png'

since scrot doesn't support %N as nanoseconds it is quite good workarround.

Note that, here in example nanoseconds were shrinked into miliseconds using first 3 digits from nanoseconds pattern expression: %3N. Local variable $TMPSCRN was used because string manipulation on shrot $f filename variable I found myself hard to implement yet impossible.

If you'd like to take the shots in .jpg format, you need to replace all occurances of .png with .jpg

4

Shutter is quite impressive, with lots of features, but still requires user interaction to capture the window that currently has the focus. I.e., when Edit->Preferences->Keyboard->Capture with selection is enabled, and "Window" is specified, Shutter still waits for the user to select the desired window, instead of automatically capturing the window that currently has the focus.

For fully automatic screen captures I found that scrot works perfectly, both for full screen captures, and capturing the current window (via the -u option), as described here: http://www.khattam.info/save-screenshots-in-ubuntu-automatically-when-printscreen-key-is-pressed-2009-05-12.html The only (very minor) issue I saw with scrot is that it cannot take more than one screen shot per second. But since it seems to take longer than a second to complete a screen capture anyway, this doesn't seem like much of an issue.

I enabled scrot (after installing it via Synaptic Package Manager) by changing my <Print> and <Alt><Print> hotkey bindings to do full screen and current window captures (respectively) and it works perfectly, as described here: How can I restore default keyboard shortcuts? In gconf-editor I set them to save to the /tmp directory by specifying these associations under apps->metacity->global_keybindings:

  • run_command_screenshot -> Print
  • run_command_window_screenshot -> <Alt>Print

and these associations under apps->metacity->keybinding_commands:

  • command_screenshot -> /usr/bin/scrot '/tmp/Screenshot-%Y-%m-%d-%H%M%S.png'
  • command_window_screenshot -> /usr/bin/scrot -u '/tmp/Screenshot-%Y-%m-%d-%H%M%S.png'

I did not have to restart anything for these changes to take effect.

I am running Ubuntu 10.04, Gnome Desktop 2.30.2.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .