I've created a simple python script and therefor have a .py file. I can run it from the terminal but if I double click it only opens up in gedit. I've read this question other places and tried the solutions, however none have worked. I'm running Ubuntu 13.04, I've selected the box to make the file executable. I've even installed a fresh instance of Ubuntu 13.10 on another computer and it does the same thing. What might I be missing here?
I had pretty much the same problem. I finally came across the solution at Ask Ubuntu. You have to change the nautilus file manager setting. Go to
Edit -> Preferences -> Behavior
and select the option as shown in the picture. Select Ask each time if you want to avoid unwanted execution of the script.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With