Can I take a screenshot and directly open it in Gimp?

Common use case for me and printscreen:

  • Hit printscreen and save .png
  • Open up Gimp
  • Find file I've saved
  • Edit file (crop and highlight regions)

It seems like the first three steps could be combined into a single key bind, e.g. printscreen auto opens Gimp, ready to edit. Is that possible?


Solution 1:

Quick version

Literally doing what you asked; in one action:

  • Take a screenshot
  • Save it in your preferred directory
  • Opening it with Gimp

    enter image description here

The script

#!/bin/bash

picsdir=~/Pictures/out.png
gnome-screenshot -f "$picsdir"
gimp "$picsdir"

How to use

  • Copy the script into an empty file, save it as take_ashot.sh
  • Set your preferred directory to save the files in, in the line:

    picsdir=~/Pictures/out.png
    

    I'd leave it as it is if your system is English, else you'd need to change the Pictures folder name.

  • Test-run it by the command:

    /bin/bash /path/to/take_ashot.sh
    
  • If all works fine, add it to a shortcut: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

    /bin/bash /path/to/take_ashot.sh
    

Note

Since you mentioned not to save the source file in most cases, I made the script overwrite previous files. If you don't want that, we'd need to build in a few renaming- lines.

Solution 2:

Why not just take the screenshot with Gimp? File > Create > Screenshot.

enter image description here

This requires no intermediate storage at all.