Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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