.desktop files not launching from desktop in Ubuntu 20.04 LTS

Make sure you've allowed launching and, maybe, selected it as Run Software on Open With tab.

enter image description here

Configure your shortcut the next way:

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=/home/alvaro/Desktop/Laptop_screen_config.sh
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/alvaro/Desktop/Ubuntu/screen.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=new-window;new-private-window;

I've copied firefox's shortcut settings and modified them to allow to launch your script. With this it allows changing its launching configuration. You could remove unneeded options and check if it works without them.


  • Move the .desktop file into ~/.local/share/applications/ and make executable if need be.

  • Move the .sh and .png files into ~/Documents and make sure the .sh is executable.

  • Modify your .desktop file for the new locations for the .sh and .png files.

  • Hit the Super key and type the name of your shortcut.

  • You can save your .desktop file as a favorite in the Dock for quick access.

Enjoy!


I had the same issue and I was struggling for quite while

Issues that I was facing:

  1. Icons were not showing
  2. Double Clicking an a desktop shortcut would open a text editor instead of launching the application

How I solved this problem?

Right click the icon > Properties > Permissions

Set Group access to Read and Write and Others Access to Read-only and check Execute.

Shortcut Icon permission settings

and select Allow Launching

Allow Launching

Now You icon will appear and you can double click to run the program

enter image description here

Tags:

.Desktop