# Screenshots



## balanga (May 4, 2021)

What would anyone recommend for taking screenshots?


----------



## aragats (May 4, 2021)

`import /tmp/scr-`date +\%m\%d-\%H\%M\%S`.png`
From graphics/ImageMagick7 ― I use it anyway for various purposes, if you don't, you may consider it overkill.
I mapped this command to the PrtScr key.


----------



## SirDice (May 4, 2021)

Console or X? I think the last time I needed to screenshot something I used import(1) from graphics/ImageMagick7.

Seriously overkill but might come in handy, Virtualbox has a screen capture (both moving and stills) function too. Useful for creating installation manuals/movies.


----------



## Allan (May 4, 2021)

Lots of folks have recommended ImageMagic and it's an excellent tool, but I've found it can be overly complex.  I've found graphics/GraphicsMagick (to be a much more compact, efficient, and easier tool than ImageMagick. Per  it's website about the Import function:



> Import reads an image from any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. Use display for redisplay, printing, editing, formatting, archiving, image processing, etc. of the captured image.
> 
> The target window can be specified by id, name, or may be selected by clicking the mouse in the desired window. If you press a button and then drag, a rectangle will form which expands and contracts as the mouse moves. To save the portion of the screen defined by the rectangle, just release the button. The keyboard bell is rung once at the beginning of the screen capture and twice when it completes.



GM started as a fork of ImageMagic since version 5.5, but has seen been completely rewritten.  I've found it a better match for my particular needs. 
Also, your particular DE should have a utility for screenshots (built-in or as an addon).  I use Xfce and there's a seperate utility for screenshots - Xfce4-Screenshooter (/x11/xfce4-screenshooter-plugin/). Your DE may have something as well.


----------



## datasmurf (May 4, 2021)

scrot is what i use.


----------



## kpedersen (May 4, 2021)

A really heavy solution is using Gimp. However, I usually annotate the screenshot using it anyway so the dependency is... "free".


----------



## grahamperrin@ (May 22, 2021)

*Spectacle* – graphics/spectacle

Recently fixed: 252313 – graphics/spectacle crashes without saving if export to remote storage is attempted

I sometimes export to Imgur, and so on.


----------



## drhowarddrfine (May 22, 2021)

Isn't there a short name x-something tool for doing that? Like xsh. I never remember what it is and never think about it till I need it. Then I can't find it


----------



## aragats (May 23, 2021)

drhowarddrfine said:


> Isn't there a short name x-something tool for doing that?


Yes! It's x11/xwd (X window dump). Large output files which cannot be used directly in most cases, although graphics/gimp does understand the format.


----------



## Deleted member 30996 (May 23, 2021)

graphics/gimp is what I use but I make heavy use of it and have it installed on all my laptops.


----------



## aragats (May 23, 2021)

Trihexagonal said:


> graphics/gimp is what I use but I make heavy use of it and have it installed on all my laptops.


The problem with GIMP is that you cannot map the screenshot capture to a key. E.g. I map the ImageMagick's action to the PrtScr key to trigger it quickly when needed.


----------



## grahamperrin@ (May 23, 2021)

aragats said:


> … graphics/gimp does understand the format.



What extension should I give the file, for it to be usable with e.g. the *Open With* feature of Dolphin?


----------



## aragats (May 23, 2021)

grahamperrin said:


> What extension should I give the file, for it to be usable with e.g. the *Open With* feature of Dolphin?


I've never cared about extensions since Gimp opens files based on their "magic". According to the Wikipedia article it can be _.xwd_.


----------



## grahamperrin@ (May 23, 2021)

aragats said:


> … According to the Wikipedia article it can be _.xwd_.



True, thanks. Result:







GIMP was already the default for '.xwd
I weeded Ark and other peculiarities from the list of applications, to leave Thunderbird as the only other.


----------



## grahamperrin@ (May 23, 2021)

aragats said:


> … cannot map the screenshot capture to a key. …



Slightly off-topic from FreeBSD, imagine a Screenshot application launching in response to the Up key. Oops!


----------



## Deleted member 30996 (May 23, 2021)

aragats said:


> The problem with GIMP is that you cannot map the screenshot capture to a key. E.g. I map the ImageMagick's action to the PrtScr key to trigger it quickly when needed.


I don't, but you can.

On the Gimp Main Menu at the top chose Edit - Keyboard Shortcuts and it will bring up the Configure Keyboard Shortcuts box shown in the shot. Then go to Plugins - Screenshot:


----------



## grahamperrin@ (May 23, 2021)

aragats said:


> trigger it quickly when needed.





Trihexagonal said:


> Configure Keyboard Shortcuts



This works in GIMP, however it's not the trigger that's needed quickly when GIMP is not already in the foreground.


----------



## Deleted member 30996 (May 23, 2021)

It has a checkbox to "Save keyboard shortcuts on exit" at the bottom of the Configure Keyboard Shortcuts box. 
If you have it open and it's not in focus it stands to reason it should still work.


----------



## grahamperrin@ (May 23, 2021)

Trihexagonal said:


> If you have it open and it's not in focus it stands to reason it should still work.



The same today as when I tested yesterday, with GIMP open and not in focus: the saved shortcut has no effect. 

After bringing GIMP to the foreground: the shortcut is effective.


----------



## Aeterna (May 28, 2021)

FreeBSD 13.0 xfce with custom kernel, zfs, geli fully encrypted in VM (host Slackware)


----------



## bleedwood (May 29, 2021)

For cli use, I prefer maim.
maim-5.6.3_3                   Screenshot utility with performance improvements over scrot


----------



## Vull (May 29, 2021)

Whenever I've installed KDE or MATE, there is always a screenshot capability built-in to the Desktop Environment software, which launches itself automatically whenever you press the [Print Screen] key (or [prt sc] key on some keyboards). It's always just there; I never have to do anything to enable it or use it, other than pressing [Print Screen]. On KDE it's called "Spectacle" but I don't even know what it's called in MATE, probably something like "mate-printscreen" I'm guessing. Super-convenient.


----------



## grahamperrin@ (May 29, 2021)

Vull said:


> … "Spectacle" … Super-convenient.



I recently discovered the lesser-known default shortcuts:


----------



## reddy (May 29, 2021)

I am personally fond of deskutils/flameshot, it keeps a system tray, has a very nice GUI and is lightweight.


----------



## a6h (May 29, 2021)

I used to use graphics/scrot with following setting in the x11-wm/i3

~/.config/i3/config

```
set $mod Mod4
bindsym Control+Print exec scrot -z -o '%y%m%d%H%M%S.png' -e 'convert $f -crop 1920x1080+0+0 $f && mv $f PICTURE_FOLDER'
bindsym Shift+Print exec scrot -z -o '%y%m%d%H%M%S.png' -e 'convert $f -crop 1366x768+1920+0 $f && mv $f PICTURE_FOLDER'
bindsym $mod+Print exec scrot -z -o '%y%m%d%H%M%S.png' -e 'mv $f PICTURE_FOLDER'
bindsym Print exec scrot -z -o -u '%y%m%d%H%M%S.png' -e 'mv $f PICTURE_FOLDER'
bindsym --release Control+Shift+Print exec scrot -z -o -s '%y%m%d%H%M%S.png' -e 'mv $f PICTURE_FOLDER'
```

Footnotes:
* PICTURE_FOLDER == Screenshot folder.

* Separate screenshot for 2 monitors:
>> 1920x1080 (primary)
>> 1366x768 (secondary)


----------



## Maxnix (May 29, 2021)

if you have graphics/imlib2 installed, you can use `imlib2_grab <filename>.<extension>`; this will take a screenshot of the entire screen. I don't know if you can select a specific window or screen portion.


----------



## Geezer (May 29, 2021)

gnome-screenshot works nicely in xfce. Simple and light weight.


----------



## grahamperrin@ (May 29, 2021)

Thanks, 



Geezer said:


> gnome-screenshot



Its _Name[en_GB]_ is _Screenshot_ but seeking the application by name doesn't find it: 






```
% grep -i en_GB /usr/local/share/applications/org.gnome.Screenshot.desktop
Name[en_GB]=Screenshot
Comment[en_GB]=Save images of your screen or individual windows
Keywords[en_GB]=snapshot;capture;print;screenshot;
Name[en_GB]=Take a Screenshot of the Whole Screen
Name[en_GB]=Take a Screenshot of the Current Window
%
```

Running `/usr/local/bin/gnome-screenshot` does perform a screenshot but there's no GUI.


----------



## rootbert (May 30, 2021)

I use xfce4-screenshooter-plugin and in Firefox for scrollshots the App "Easy Screenshot"


----------



## grahamperrin@ (May 30, 2021)

rootbert said:


> … in Firefox for scrollshots …



The integrated feature seems to have better functionality than the extension:


----------



## Geezer (May 30, 2021)

grahamperrin said:


> Running `/usr/local/bin/gnome-screenshot` does perform a screenshot but there's no GUI.



`/usr/local/bin/gnome-screenshot -i`
or
`/usr/local/bin/gnome-screenshot --interactive`


----------



## grahamperrin@ (May 30, 2021)

Thanks, I found what might be the problem:


```
% grep KDE /usr/local/share/applications/org.gnome.Screenshot.desktop
NotShowIn=KDE;
%
```

By design in 2008: <https://gitlab.gnome.org/GNOME/gnom...fc10dd03aa3e8a1898fd4e79a65f5f50f1f601b_11_10>


----------

