When first clicking an .sh file KDE asked my how I want to handle them, but I miss clicked and disabled the option that would run a .sh file by default.
Its not a big deal since I can still run .sh files in the terminal, but I couldn’t find an option to reset the default behavior when clicking on it.
So how can I reset the default behavior for .sh files or manually configure it to execute when clicking/double-clicking?
I think I would have to change the settings here:
KDE-Settings-> Applications->File association->application->x-shellscript
But I am not sure what I would have to choose in order for it to run as application on default(also I guess I removed everything in an attempt to reset the settings).
If an ASCII text file is marked as executable the filemanager should - as a precaution ask what to do - not blindly execute as this could result in execution of a bad script.
PCManFM-Qt
In any case - check the file ~/.config/mimeapps.list perhaps it is located elsewhere - Dolphin is not my favorite.
This popup would be the behavior I want/expect but I dont know how I can restore the behavior to that point, also I think when that pop-up first came up there also was a checkbox that said something like “never ask me again” and I clicked that and selected dont open/run or so and since than I cant run them when clicking,
on right click I just get asked which Application I want to use.
What would I have to change/check in the ~/.config/mimeapps.list file? It contains [Added Associations], [Default Applications] and [Removed Associations] but I dont really get if some of thouse apply to all .sh files marked as applications/allowed to run.
Check the file ~/.config/kiorc in your system. If you see the following lines in it
[Executable scripts]
behaviourOnLaunch=open
you can
delete these two lines from the file
(this will result in a prompt dialog window every time you click on an executable file, which will ask you if you want to open or to execute the file)
change the lines to
[Executable scripts]
behaviourOnLaunch=execute
(this will execute the .sh file without any prompt)