MATE Desktop - Screenshot of an area shortcut

In Debian 8.3 with MATE Desktop you can by default do two types of screenshots using the keyboard:

Print Screen/SysRq = Takes a regular screenshot
Print Screen/SysRq + Alt = Takes a screenshot of the current focused window

But what if you would like to take a screenshot of a selected area, like in OS X or similar?

I found out that you can run this in a terminal window to select an area:
/usr/bin/mate-screenshot -a (or --area)

However running things in terminal was not what I had in mind. So I tried to go to System, Settings and Keyboard shortcuts.

There I tried to make a shortcut, like Print Screen / SysRq + Ctrl and map it to the above command.

But it did not work. Pushing Print Screen / SysRq + Ctrl only took a regular screenshot.

After some research I found this:
http://superuser.com/questions/966867/mate-screenshot-area-works-in-terminal-but-not-in-hotkey

Following it I did a script file and filled it with this:

#!/bin/sh
sleep 1
exec /usr/bin/mate-screenshot $@

Then I put that script file somewhere, like /usr/bin/local/mate-screenshot-wrapper and made it executable (chmod +x filename).

And then I went to the keyboard shortcuts and replaced the path to mate-screenshot with the new mate-screenshot-wrapper. I left the -a parameter as it is still needed.

Then it worked.


This is a personal note. Last updated: 2016-08-21 17:13:39.



GitHub

My

GitLab

My

LinkedIn

My

Klebe.se

Don't forget to pay my friend a visit too. Joakim