Questions about the Categories= line in desktop files

To all:

This is not a problem, my system is currently nominal.

Recently I upgraded to Leap 16.0 and decided to cleanup the entries in the KDE applications launcher.

I found 147 desktop files in the ~/.local/share/applications/ folder matching those in the system’s /usr/share/applications folder, except that the local copy has one additional line “Categories={fill in the correct category}” which is missing in the analogous system desktop file.

I ran an experiment, moved the 147 files in the local copy to a /tmp directory and redid the update-desktop-database ~/.local/share/applications command. After this, lots of entries showed up in the “Lost & Found” category on the KDE menu editor page.

Two questions:

  1. How does the KDE launcher know which category to place the desktop file entry if the system desktop is missing the Categories= line?

  2. After I restored the 147 desktop files, things went back to normal with both the “Lost & Found” and “.hidden” categories having no entries. Does this mean that I need to copy all my desktop files in the ~/.local/share/applications folder to a safe location whenever doing an OS upgrade such as Leap 16.0 to Leap 16.1 ?

It took quite awhile to clean up the splashover from several OS upgrades which affected the KDE launcher apps, and I am trying to understand how to safe migrate those apps across these changes in the future and keep things better organized.

- Randall

For categories, see http://en.opensuse.org/openSUSE:Packaging_desktop_menu_categories

Also see
https://en.opensuse.org/openSUSE:Update-desktop-files_deprecation

This is very helpful information, thank you Malcolm, much appreciated.

Why does my Leap 16.0 /usr/share/applications/ folder show 332 desktops with 184 containing the Categories= line, but 148 desktops are missing this line? Is this because of the current changes ongoing? I am curious at to why this mixture in the systems desktop folder?

Likely xdg related ones, or executing something in /usr/libexec or OnlyShowIn etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.