18

For some reason, I cannot launch .desktop files. When I double-click the file, it opens the Text Editor. The desktop file has "Allow executing file as program" turned on (-rwx). In the tab "Open with", the Text Editor is the default application. Clicking reset in that tab changes it to the Text Editor, so it basically does nothing.

Any way to solve this?

1 Answer 1

18

Basically, I found that the Files/Nautilus application does not allow executing .desktop files anymore. Instead there are 2 options we can do.

  1. Enable 'Desktop icons' using GNOME Tweaks and create the .desktop file inside the Desktop folder. Then it will appear on the desktop (without its icon). Then right click on the desktop icon and choose "Allow launching" and the icon will appear and it will be executable.

  2. Add the .desktop file inside the ~/.local/share/applications and then it will appear in the App launcher, so you can add it to the Dock (add to favorites) and copy to the Desktop folder to add to Desktop.

5
  • 4
    Is there a CLI way for "Allow Launching"?
    – Oliver R.
    Mar 19, 2020 at 19:56
  • 3
    "Allow launching" is not an option on 20.04. Aug 27, 2020 at 15:35
  • Sometimes it requires a logout and login for the desktop files in the user's application folder to appear in the app launcher or for the Allow launching option to appear in the desktop icon's context menu. I'm using Ubuntu 20.10 Beta with Gnome 3.38, not sure if it's some bug or something else. However, your answer worked for me, upvoted! Oct 5, 2020 at 15:28
  • 1
    Man, they've really hobbled Nautilus...
    – shmim
    Nov 23, 2020 at 5:09
  • For those interested a CLI way of solving it has been found: askubuntu.com/questions/1314919/… ...hope it helps you like it did for me.
    – miyalys
    Mar 27, 2021 at 17:55

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.