0

I'm trying to create a simple 'double click' executable to open a large number of specific folders and applications for a user uncomfortable with using the terminal.

The script is simple enough and works as expected when running through the terminal with the following command:

python3 /home/xxxx/Desktop/setup.py

When I double click the file, it opens in the text editor.

I have added executable permission with:

sudo chmod +x /home/xxxx/Desktop/setup.py

...and I've given ample permission with:

sudo chmod 755 /home/xxxx/Desktop/setup.py

...and it has what I think is the appropriate shebang at the top of the file:

#!/usr/bin/env python3

I would expect to see a pop up which asks something like "Do you want to run this as an executable?" but this pop up doesn't appear.

I tried "open with another application" but I found no way to actually open with the terminal or python directly from there.

Getting desperate, I tried to just create a desktop short cut:

lxshortcut -o /home/xxxx/Desktop/setup.py

...but even this didn't work. The .Desktop file created would only open as a text file.

I'm using Ubuntu 18.04 LTS.

Thanks in advance for any help/ideas.

Extra Info:

the script doesn't need to be executable from another computer

python3 is installed

user3535074
  • 101
  • 2
  • See this answer. By default, the file manager does not allow execution of scripts. To change this behavior, open Preferences (click on Files at top-left of the screen), select the tab "Behavior" and change the setting for executable text files. – AlexP Jul 02 '18 at 12:09
  • Thankyou for the detailed instruction! I had looked for this before but only in the system settings. Now it works – user3535074 Jul 02 '18 at 12:51
  • 2
    Please get out of the habit of using sudo to manipulate files in your own home directory – steeldriver Jul 02 '18 at 13:00

0 Answers0