Dolphin has a nasty habit to execute whatever executable file I accidentally click on. How to turn off this behavior? Is there anything like in Nautilus which would allow to select appropriate action?


There is no real gui option in Dolphin that allows you to do what you want, but I think the way to do this would be to edit the list of mime types, as has been suggested by 'Farry' on the KDE forums. I have just tested the method below quoted from the KDE forums and it did work for me. Make sure to update the mime database as in the instructions and quit Dolphin and reload it to see the difference (restart if necessary).

Quoted from the KDE forum, (with my gksudo gedit addition) credit to 'Farry':

(Make a backup of the file before you proceed)

gksudo gedit /usr/share/mime/packages/freedesktop.org.xml
and find the line that starts the shellscript section:
  <mime-type type="application/x-shellscript">
then scroll down to find this line within that section:
   <sub-class-of type="application/x-executable"/>
then comment it out like so:
   <!-- <sub-class-of type="application/x-executable"/> -->
save that, then compile it with this command:
  sudo update-mime-database /usr/share/mime

As I said, it worked for me and it should for anyone, as long as you use gedit's search capability to find the right part of the file to edit; be careful as it is an important file. As I mentioned earlier, it is important to make a backup of it before editing it.

In the future, if you want to return to the original state of the file and let scripts execute when clicking on them, the commenting out as discussed above can be removed and the mime database updated again.

  • Is there any way to do that for a user, not in the global file? I.e. without any root access?
    – Albert
    Oct 26 '16 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.