Opening a file versus running a file

In my haste of having a new operating system installed and loving it I may have gotten a little to click happy with installing and running certain programs. I downloaded a program and in it was a folder with the program contents and next to it a *.desktop file. The real problem is that I seem to have set the *.desktop file to always open versus executing it when I double click on it. I screwed around a bit under the properties section and may have made things worse. I essentially want the file to execute and if there is a command line way to do this than I am all ears. But I would also like to know how to undo the madness I have created by configuring the file to once again prompt me with the choice of opening it versus executing it from a GUI standpoint. Also after my hasty clicking, when I right click on the file itself, under the permissions section the Execute box is checked and now the prompt for which program to open the file comes up along with a list of possible programs and I am no closer to being able to execute this *.desktop file.

Undoubtedly this question has been asked in some form on this forum before and I apologize for the redundancy, but in all honesty the results I get for when I seek a solution online seem to be a bit hard to decipher for me. So any help is appreciated.

Please, tell us which Desktop GUI you are using:

  • KDE?
  • GNOME?
  • MATE?
  • Xfce?
  • Enlightenment?
  • Cinnamon?
  • LXQt?

I am working with KDE at the moment.

But I would also like to know how to undo the madness I have created by configuring the file to once again prompt me with the choice of opening it versus executing it from a GUI standpoint.

For KDE this behaviour is configured in ~/config/kiorc

[Executable scripts]
behaviourOnLaunch=execute

so just remove the above entry and you will get queried again

Reference:
https://forum.kde.org/viewtopic.php?f=224&t=129445

As the page I linked to mentions the behaviour can also be set from via Dolphin’s menu…

Settings -> Configure Dolphin -> General -> Confirmations

Perfect. That seems to have resolved my issue. Thank you so very much!