How to automatically close an application on shutdown (graceful close, not kill)?
I try to call
wmctrl -c "App" in
powerbtn.sh, but it does not work. The same
wmctrl command works perfectly when typed in terminal or called from a script without superuser rights.
Why does not it work in
powerbtn.sh and how to fix it?