I'm editing a bunch of foo.r files (source R files for an R packages) in Ubuntu Unity 12.10. Every time I click on one of these files to open it in gedit, a dialogue box comes up: "Do you want to run foo.r, or display its contents?" and then I have to click on a "display" tab. Can I make it open automatically in gedit? Note that gedit is already set as the default open-with program.

  • This is just a link, but you can disable that dialogue from settings. I just found this: zartl.info/?p=17. – daboross Jun 20 '13 at 21:57

Run in terminal:

gsettings set org.gnome.nautilus.preferences executable-text-activation 'display'

Or you can launch dconf-editor and navigate to /org/gnome/nautilus/preferences, then select the executable-text-activation key. Here is its description:

What to do with executable text files when they are activated (single or double clicked). Possible values are "launch" to launch them as programs, "ask" to ask what to do via a dialog, and "display" to display them as text files.

  • This seemed to work! Now I wonder what org.gnome.nautilus.preferences is -- does it exist somewhere as a text file that I could also have opened and edited manually? – zkurtz Jun 21 '13 at 0:45
  • "GNOME session daemon is responsible for setting the various parameters of a GNOME session and the applications that run under it." Settings are stored in .config/dconf/user, but it is not manually editable. – Eric Carvalho Jun 21 '13 at 2:34
  • @zkurtz I've updated my answer. – Eric Carvalho Jun 21 '13 at 2:40
  • Thanks! However, when I type "dconf -editor" at the command line, I just get "error: unknown command -editor". Is there another way to "launch"? – zkurtz Jun 21 '13 at 3:07
  • @zkurtz dconf-editor, no spaces. – Eric Carvalho Jun 21 '13 at 10:24

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.