.desktop application shortcuts stop working after restart or log in and don't appear as correct icons on Ubuntu 20.04
I'm trying to create launcher icons on my desktop. I got them to work properly by creating a file with .desktop extension with suitable content, for example:
[Desktop Entry]
Name=Google
Exec=/usr/bin/firefox
Type=Link
URL=
Icon=firefoxHowever when I log out or restart the system the file stops working. For some reason the system starts treating it as a normal text file, despite it having a .desktop extension.
I have tried giving the file execution permission and it does not seem to affect it in any way. I have also tried adding the file to /local/share/applications/ directory but it didn't have any effect.
So, the .desktop file works during the current session, but stops working after re-boot.
Also I just noticed that when I create something else on the desktop with the text editor like test.txt the .desktop file starts working again (for that session).
After creation ( current session ):
After re-booting / logging out/in
4 Reset to default