Bottles icon indicating copy to clipboard operation
Bottles copied to clipboard

`create_desktop_entry` should assign programs a better category

Open SuperSamus opened this issue 2 years ago • 5 comments

When Bottles creates a .desktop file for an installed program, the function create_desktop_entry uses this to set the application category:

https://github.com/bottlesdevs/Bottles/blob/c85edf809a91cd84c82e1aa0548827d691b07a74/bottles/backend/utils/manager.py#L257

There are two problems:

  • If you look at the Freedesktop documentation, the category Application doesn't exist.
  • For desktop environments that divide the applications in categories (like KDE), all programs will be put in a category like "Lost & Found", instead of (for example) GOG and Origin being of the Game category.

Of course, this can't be feasibly done for every program that exists, but maybe it could be done for the ones that are on https://github.com/bottlesdevs/programs.

SuperSamus avatar Jan 19 '23 11:01 SuperSamus

I think its not possible to categorize windows apps properly, we can have a keep a list of most common apps but that still leaves vast majority of programs, one other way is to let the user assign categories to the desktop entries.

cyberphantom52 avatar Jan 19 '23 15:01 cyberphantom52

FWIW GNOME doesn't use categories, so I'm not sure if it justifies complicating (you'd already would have a confirmation dialog were we using portals) the shortcut creation for a relatively fairly niche feature like that.

jannuary avatar Jan 19 '23 16:01 jannuary

What if Bottles were to use Categories=Game; in desktop entries created from "Gaming" (as opposed to "Application" or "Custom") bottles? It wouldn't be foolproof, but it's probably a safe bet that programs used in such bottles are either games or at least game-related. (Note that game-related programs such as Steam, ScummVM, etc. typically have shortcuts with Categories=Game; despite not being games themselves.)

As for compliance with the Desktop Entry Specification and Desktop Menu Specification: Apparently the Categories key is not actually required, so omitting the Categories key may be preferable to using an unrecognized value.

michaelneverwins avatar Sep 27 '23 16:09 michaelneverwins

This issue has been automatically closed as part of a cleanup process to help the team manage issues more effectively.

If the problem still persists, feel free to comment and we will gladly reopen it.

github-actions[bot] avatar May 30 '25 00:05 github-actions[bot]

This is still an issue.

SuperSamus avatar May 30 '25 10:05 SuperSamus