Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I double click on text files, nautilus asks me what I would like to do with them. I find this to be intrusive, as I just want them to open.

How can I fix this?

Note: This question is a "canonical" question on the subject; edit if needed.
Note 2: Text files can be HTML, CSS, TXT, and more.

share|improve this question
up vote 6 down vote accepted

Go to Edit>Preferences>Behavior in Nautilus, and change this option:


What these options mean:

"Run executable text files when they are opened"
This option will execute (run) text files as if they are programs (or scripts), but note that if the files are not scripts or have errors, you won't see a thing.

Note: This option is very risky, because it could allow you to run dangerous scripts accidentally.

"View executable text files when they are opened"
This option will provide the most comfortable behaviour, if you just need to view your text files (HTML, CSS, txt, etc). When you need to run actual scripts, you can right click them and choose to run them from the context menu, or use a terminal.

"Ask each time"
This option provides a safe balance between the two other options, allowing you to choose each time you double click on a text file, and providing a prompt that should help to avoid running risky files accidentally.

share|improve this answer
The filemanager ask for execution only if the exec bit is set, so it make sense to me. Better to remove the exec bit when unneeded. – enzotib Nov 28 '11 at 17:00
@enzotib the person who originally brought up the issue had this happening with all text files. – RolandiXor Nov 28 '11 at 17:08
I think the first option is wrong: the choice is valid only for files that are both executable and text file. Non-executable are always open in the editor (or whatever application they are associated with). – enzotib Nov 28 '11 at 17:13
@enzotib: yes, but read my comment again :). – RolandiXor Nov 28 '11 at 19:58

Your Answer


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.