7

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?

  • 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 ?) – Sergiy Kolodyazhnyy Aug 5 '16 at 22:32
5

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"
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
    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. – David Foerster Jul 18 '17 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.