Invalid .desktop files

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Alexiy
Level 3
Level 3
Posts: 173
Joined: Wed Mar 23, 2016 12:24 pm

Invalid .desktop files

Post by Alexiy »

I have a question regarding .desktop files in /usr/share/aplications. I have at least one file that points to not-installed application (Vim) and several duplicates of other files.
Image
Is it safe to delete them?

Habitual
Level 13
Level 13
Posts: 4863
Joined: Sun Nov 21, 2010 8:31 pm
Location: 0.0.0.0

Re: Invalid .desktop files

Post by Habitual »

Those files in that directory, on my system are the Menu Items.

You may wish to reconsider deletion candidates.

VapinPagan
Level 1
Level 1
Posts: 12
Joined: Sun Oct 06, 2019 8:36 pm

Re: Invalid .desktop files

Post by VapinPagan »

Would that still be the case if I were getting an error telling me "Invalid .desktop file detected"?
One of the things I love about this OS is no errors and this is really irritating me. Any suggestions or help on this specific topic would be greatly appreciated.

User avatar
smurphos
Level 17
Level 17
Posts: 7067
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Invalid .desktop files

Post by smurphos »

Alexiy wrote:
Sun Jul 16, 2017 1:27 pm
I have a question regarding .desktop files in /usr/share/aplications. I have at least one file that points to not-installed application (Vim) and several duplicates of other files.
Is it safe to delete them?
apt contains /path/to/foo.desktop will tell you if the desktop file has in fact been left over by a removed on non existent package.

E.g vim.deskstop is present as vim-common is installed.

Code: Select all

steve@steve-Inspiron-5580:/usr/share/applications$ apt contains /usr/share/applications/vim.desktop
vim-common: /usr/share/applications/vim.desktop
steve@steve-Inspiron-5580:/usr/share/applications$ apt policy vim-common
vim-common:
  Installed: 2:8.0.1453-1ubuntu1.1
  Candidate: 2:8.0.1453-1ubuntu1.1
  Version table:
 *** 2:8.0.1453-1ubuntu1.1 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
        100 /var/lib/dpkg/status
     2:8.0.1453-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
Why is vim-common installed? It's a dependency of vim-tiny, which in turn is a dependency of ubuntu-minimal.

ubuntu-minimal is a metapackage that draws in a variety of basic tools as dependencies.

vim-tiny I think is included as an option for the default editor for sudoedit.

Which other files are you concerned about specifically? Multiple entries are not necessarily unusual. A few of the default applications have KDE specific desktop files. Some have at first glance identical desktop files which in fact have different commands when you drill down.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

User avatar
smurphos
Level 17
Level 17
Posts: 7067
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Invalid .desktop files

Post by smurphos »

VapinPagan wrote:
Sun Oct 06, 2019 8:42 pm
Would that still be the case if I were getting an error telling me "Invalid .desktop file detected"?
One of the things I love about this OS is no errors and this is really irritating me. Any suggestions or help on this specific topic would be greatly appreciated.
Where are you seeing the error and does it give a clue as to the location of the invalid desktop file?

Edit to add - just realised this thread has been revived from the dead.

@VapinPagan - forum rules and protocol is to start a new thread for your specific question...
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

VapinPagan
Level 1
Level 1
Posts: 12
Joined: Sun Oct 06, 2019 8:36 pm

Re: Invalid .desktop files

Post by VapinPagan »

I apologize but I think that is a rather strict interpretation of the forum rules. This is not off topic far as I can see, it is either the same issue with a different application or definitely related to the issue first announced on this topic. I merely asked an additional question to get a better understanding of the issue. Now if I am being quoted forum rules for that...then the "be friendly and help noobs" parts of these forums rules are non-existent. I take regulations, rules, and being respectful very seriously thanks. Have a nice day...

PS - I am far from a noob here and I must admit I rather take offense to that reply.

User avatar
smurphos
Level 17
Level 17
Posts: 7067
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Invalid .desktop files

Post by smurphos »

No offense was intended, it was just a friendly pointer that reviving old threads is generally frowned upon around here. Sorry if it didn't come across that way.

Happy to help with your question if you can add a bit more context as requested.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

VapinPagan
Level 1
Level 1
Posts: 12
Joined: Sun Oct 06, 2019 8:36 pm

Re: Invalid .desktop files

Post by VapinPagan »

apology accepted, and I would love to do just that...however, when I just went to replicate the error to screenshot it for you guess what...it appears to have fixed itself. I had this error all day yesterday but now it appears to be repaired so I would be unable to elaborate. LOL

I thought I should post this also - sorry I cannot tell anyone how I fixed it because I did not. Thank you for all the attempted assistance anyway.

User avatar
smurphos
Level 17
Level 17
Posts: 7067
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Invalid .desktop files

Post by smurphos »

No worries - if it does come back please repost - I was intrigued. :)
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

Post Reply

Return to “Software & Applications”