I have a script that I merged into a single file by using pyinstaller. For the case, let´s do it with a simpler example, since the error also ocurrs:


print "Hello World!"

By running pyinstaller --onefile helloworld.py, it creates the dist Folder with the executable file inside (helloworld).

I can run correctly this file on the terminal by typing ./helloworld, but it does not work if a make double-click, or right-click > Run.

Before you are asking, yes, in the properties of the file the Option Allow executing file as program is checked.

Also, in Nautilus, going to Edit > Preferences > Behavior, I already selected the option Ask each time for the Executable Text Files.

I am aware that there are many questions about the same thing, but I have tried everything and I couldn´t solve the problem still. Does anyone know what can be happening? Thanks in advance.

1 Answer 1


In fact the file is executed, but running a program from Nautilus doesn't open it in a terminal. The best way to run a software is create a shell desktop entry within /usr/share/applications or ~/.local/share/applications. Desktop with be named something like helloworld.desktop and should contain the following example:

[Desktop Entry]

# The type as listed above

# The version of the desktop entry specification to which this file complies

# The name of the application

# A comment which can/will be used as a tooltip
Comment=This is just a sample

# The path to the folder in which the executable is run

# The executable of the application, possibly with arguments.

# The name of the icon that will be used to display this entry

# Describes whether this application needs to be run in a terminal or not

# Describes the categories in which this entry should be shown

Source of the information : https://wiki.archlinux.org/index.php/desktop_entries


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.