Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

execute python script from linux desktop

Tags:

python

ubuntu

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?

like image 442
Alfred Avatar asked Dec 03 '25 09:12

Alfred


1 Answers

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.
enter image description here

like image 196
Akas Antony Avatar answered Dec 04 '25 23:12

Akas Antony



Donate For Us

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