10

Just installed MATE on my laptop running Ubuntu 16.04 and I tried to get to mate-screenshot the same behaviour as gnome-screenshot does in Unity: just press Shift+Print to choose the portion of the screen that you want to capture. The corresponding command to be executed under MATE should be "mate-screenshot -a", executing it manually works, but trying to set it as custom shortcut doesn't work, it does nothing.

Any ideas?

1
  • I just tried that: set Shift+Print_Screen to mate-screenshot -a , which worked fine. Is there any possibility of hardware issues ? ( meaning, can you try another keyboard ?) Aug 5, 2016 at 22:32

3 Answers 3

8

There is still an opened issue for that. tl;dr: this is a timing problem with focus. workaround:

bash -c "sleep 0.1 && mate-screenshot -a"
2
  • Even almost 3 years later and on Manjaro, this issue still seems to exist. Sleeping for 0.1s fixes that. Apr 21, 2020 at 4:33
  • Debian 11, same bug 🤷.
    – Mario Mey
    Sep 7, 2021 at 23:57
3

I reproduced your issue and with help from @Serg and @Seth I figured out how to fix it.

In the shortcut you have set DISPLAY to match your environment. First check the variable:

echo $DISPLAY

and take note of the output. For me it's :0.0

Originally I suggested using this command in the shortcut setting:

bash -c "DISPLAY=:0.0 mate-screenshot -a"

Replacing :0.0 to match the output you got when you checked the variable

But @DavidFoerster pointed out in a comment that the more efficient and proper way is to use

env DISPLAY=:0.0 mate-screenshot -a

Which might make it a touch faster.

1
  • 1
    The canonical way to run a command with a particular environment variable value is via the env command, e. g. env DISPLAY=:0.0 mate-screenshot -a. No need to resort to the relatively bloated Bash (or even Dash). Otherwise +1. Jul 18, 2017 at 6:55
0

Workaround if using Compiz and you can give up Windows captures.

Go into Compiz Mate Compatibility settings and change the Window screenshot command line to mate-screenshot -a. It will then work if you are already using compiz (not Marco). The shortcut key combo is ALT + Printscreen.

compiz settings

You must log in to answer this question.

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