.desktop files not launching from desktop in Ubuntu 20.04 LTS
Solution 1:
Make sure you've allowed launching and, maybe, selected it as Run Software on Open With tab.
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.
Solution 2:
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!
Solution 3:
This was hidden in the comments but it is absolutely the only way to make it work on Ubuntu 20.04 LTS after the latest updates:
This still works (going back several Ubuntu versions):
Copy the application launcher in your home directory (~/application.desktop)
At the command line (in a terminal) run "sudo desktop-file-install application.desktop" (without the quotes).
This checks the syntax of the launcher and (if it has no errors) installs it into /usr/share/applications
Open nautilus in /usr/share/applications.
Find the icon for the launcher (application.desktop) and drag the icon to some convenient location in the dash. This locks the launcher to the dash.