SUMMARY Keyboard shortcuts created from KMenuEdit for scripts in /usr/bin do not work. STEPS TO REPRODUCE 1.Create a Script in /usr/bin, for example $ kate /usr/bin/screenpowersave.sh With content: #!/bin/bash sleep 5; xset dpms force standby 2. Open KMenu edit, create a new entry to launch the script, In General tab, select the script in Command field: /usr/bin/screenpowersave.sh 3. In Advanced tab create a new keyboard shortcut to launch the script, and save the changes OBSERVED RESULT When you press the keyboard shortcut to run the script, it is not executed EXPECTED RESULT Run the script SOFTWARE/OS VERSIONS KDE Neon 20.04 (Testing) KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77.0 ADDITIONAL INFORMATION The method I describe above had always worked for me. It stopped working about a year ago when many bugs related to custom keyboard shortcuts had also been reported. Run the script from the Applications Menu or run "/usr/bin/screenpowersave.sh" from Krunner, the script is executed correctly. Only trying to run with the configured shortcut en KMenuEdit doesn't work.
In the description in Step 1 I forgot the step that you have to give the script permission to execute, of course. $ sudo chmod +x screenpowersave.sh
Ok, this is driving me crazy. I have tried recreating the steps for a whole new script, with a whole new entry in KMenuEdit and a whole new shortcut and it worked. But then removing that new entry and trying to configure old KMenuEdit entry with that new script never worked again. I have not been able to determine when it works and when it does not.