M BUZZ CRAZE NEWS
// news

.desktop application shortcuts stop working after restart or log in and don't appear as correct icons on Ubuntu 20.04

By Joseph Russell

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=firefox

However 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 ):

Firefox shortcut icon

After re-booting / logging out/in

text file with .desktop extension

4 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy