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?
Asked
Active
Viewed 1,141 times
3
pixelpax
- 131
2 Answers
2
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
Sydney
- 21
1
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 sleep 0.1.
Hat tip: https://github.com/mate-desktop/mate-utils/issues/37#issuecomment-155736099
mmalone
- 111