Mate, use gnome-screenshot instead of mate-screenshot
Solution 1
Actually, mate-screenshot
does have the utility you want, (see man mate-screenshot
) so there's no need to install an extra package. In a terminal, you can use the -a
flag
mate-screenshot -a
This turns the pointer into a cross-hair and you can click and drag to select the area you want to grab.
You can set a custom shortcut for it (for example shift+prt sc like gnome-screenshot
) in:
System > Preferences > Hardware > Keyboard Shortcuts
click the + Add button to add a custom one.
You may well find that using the command mate-screenshot -a
in the keyboard shortcut does not work, in which case you need to modify the command to call bash and set DISPLAY... First check the variable in a terminal:
echo $DISPLAY
and take note of the output. For me it's :0.0
Then use this command in the shortcut setting:
bash -c "DISPLAY=:0.0 mate-screenshot -a"
Replacing :0.0
to match the output from echo $DISPLAY
Solution 2
I resolved the same issue by adding the --interactive
option
gnome-screenshot --interactive
Solution 3
As @Zanna sais, mate-screenshot does have the availability of doing area screenshots.
But there is a well known bug (https://github.com/mate-desktop/mate-utils/issues/37) which makes the command with this option fail.
As mentioned in the comments, the solution is to slighly delay the command:
#!/bin/bash
sleep 1
exec /usr/bin/mate-screenshot $@
within eg. /usr/local/bin/mate-screenshot
and use it instead.
It changed my life, I keep using this feature now!
Related videos on Youtube
Augustin Riedinger
Start-up enthusiast Web developer. Focusing on Ruby-on-Rails and Javascript essentially. In love with React. Check my portfolio for more info: https://augustin-riedinger.fr
Updated on September 18, 2022Comments
-
Augustin Riedinger almost 2 years
I am a big fan of Mate desktop. Simple and very functional.
But there one thing I'd address to the mate desktop: its screenshot utility is too poor.
The very single feature I miss there is being able to take a screenshot of only a part of the screen. It is apparently available with
gnome-screenshot
as from this post: What screenshot tools are available?Is there any way I could replace
mate-screenshot
tognome-screenshot
?I tried
sudo apt-get install gnome-screenshot
but then if I try to launch it, I have▶ gnome-screenshot ** Message: Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11.
Besides, I really need the shortcuts (the whole point is to achieve it in two clicks), so even if I get it working, I'll also need this.
FYI, I was using shutter earlier, but removed it because it was lacking the desktop shortcuts and sometimes very buggy (need to hard shutdown the system).
-
DK Bose over 8 yearsPlease see ubuntuforums.org/…
-
-
Sk4ry over 6 yearsor
mate-screenshot --interactive
-
sangorys over 5 yearsThis solution does not work for me. the command works in a terminal but not as a shortcut. Any idea to help me ?
-
Zanna over 5 years@sangorys did you try
echo $DISPLAY
and the second half of the answer? -
sangorys over 5 yearsYes. The answer is :0 from the terminal and :0.0 from the shortcut. None of them are working ! :(
-
Zanna over 5 years@sangorys So did you put in your shortcut assignment
bash -c "DISPLAY=:0 mate-screenshot -a"
? -
sangorys over 5 yearsyes indeed. And nothing works !
-
N0rbert over 4 yearsLooks too difficult. For which Ubuntu MATE version do you propose this solution? Why do not you want to use
mate-screenshot -i
instead? -
Augustin Riedinger over 4 yearsOh no ! You have no idea how
mate-screenshot -a
is much UX friendly than-i
. PressPrintScreen
make a square, and that's it, you have the cropped screenshot you need. What seems so difficult with this? I'm using the latest version of Linux Mint but the bug is hard to solve hence is here to stay.