0

I am using Krusader 2.7.2 as a file manager.

When I double click on a Python script, it shows the following error message:

execvp: Exec format error

After I click "Ok" another error message is shown:

Could not start 'file.py'

After I click on "Ok" nothing more happens.

How can I configure Krusader to open my Python scripts in Kate (or KDevelop) rather than try to run them?

  • Other information about my system:
  • Operating System: Kubuntu 20.10
  • KDE Plasma Version: 5.19.5
  • KDE Frameworks Version: 5.74.0
  • Qt Version: 5.14.2
  • Kernel Version: 5.8.0-33-generic
  • OS Type: 64-bit
  • Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
  • Memory: 15,5 GiB of RAM
  • Graphics Processor: GeForce GTX 1060/PCIe/SSE2
1
  • Easiest method and security wise better: do not make the files executable. use python3 {script} to execute them. When the files are not executable an editor will treat them as text file
    – Rinzwind
    Dec 26, 2020 at 10:15

1 Answer 1

2

In Krusader, you can right-click on a file, then "Open With", then "Other...", and in the menu that opens you can associate the file type with the application you want. Check "Remember application association..." at the bottom so it is persistent.

This will actually associate the MIME type associated to this file to the application system-wide. You should also be able to edit that from the system settings somewhere. I am not sure however how the file type/extension is linked to the MIME type.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .