When I type
mate-screenshot -a into my terminal, I'm given crosshairs and everything is dandy. However, my declared keyboard shortcut with command
mate-screenshot -a just takes a screenshot of the whole desktop. What's going on here?
When I type
Old topic with no answer. I have the same problem. What is funny: "--interctive" option works well.– ardabroApr 7, 2016 at 20:13
Looks like this is a known bug in mate-screenshot: github.com/mate-desktop/mate-utils/issues/37– mmaloneApr 15, 2016 at 19:17
This can also be done as a one-liner in the keyboard shortcuts, in case anyone else still has this problem:
bash -c "sleep 0.1; mate-screenshot -a"
is working well for me
There appears to be a race condition with the interaction between the MATE shortcut system and mate-screenshot. You can work-around the bug by creating a wrapper
/usr/local/bin/mate-screenshot-wrapper similar to this:
#!/bin/sh sleep 1 exec /usr/bin/mate-screenshot $@
Then assign your custom shortcut to
/usr/local/bin/mate-screenshot-wrapper -a. On my system I can get away with reducing the
sleep 1 to
Hat tip: https://github.com/mate-desktop/mate-utils/issues/37#issuecomment-155736099