My Python script has an interpreter in a first line. The file is executable. Is it possible that I click on my script and the terminal windows opens, executes the script and stays open?

Right now, when I click on it, a question pops up saying 'open or execute'. I choose execute, but nothing happens.

I use Kubuntu 16.10 and Dolphin file manager.


In Dolphin, just right-click the script and choose "Open With > Other..." and hit the checkbox that says "Run in terminal". You'll need to choose your terminal emulator from the list of software as well. Unfortunately, I think you'll have to tell it to always open .py files the same way if you want it to stick.

  • No, it doesn't work. When I do this, konsole opens and throws kf5.kcoreaddons.kaboutdata: Could not initialize the equivalent properties of Q*Application: no instance (yet) existing. Next time when I click on the script, message pops up again saying Open, execute, cancel. If I click 'execute' nothing happens, no window opens – Hrvoje T Nov 26 '16 at 21:22

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.