click hook refuses to install desktop files with NoDisplay=true
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-app-launch (Ubuntu) |
Opinion
|
Undecided
|
Unassigned |
Bug Description
If a click package uses the "desktop" hook to attempt to install a .desktop file with NoDisplay=true set, a warning will be printed and the file will not be installed.
The code making the decision is desktop_to_exec(), which seems to be used by both the "hook" and "launch" executables:
I don't have a problem with refusing to launch a NoDisplay app (although I'm not sure why it would be such a bad thing), but refusing to install them definitely seems like a bug: if the package didn't want the file installed, it wouldn't have used the hook.
As a concrete use case, consider the online accounts settings page: underneath each account, it shows a list of services that can be enabled/disabled. The icon and description for each service comes from a .desktop file associated with the service.
So if we have a non-application (such as a scope) that wants to use the online accounts infrastructure, it will still need to install a desktop file somewhere online accounts can see it. Since it is not an application, it would set NoDisplay=true to prevent it displaying in the apps scope. However this prevents the desktop file from being installed, defeating the purpose.
Changed in ubuntu-app-launch (Ubuntu): | |
status: | New → Confirmed |
I think that what we're using the "desktop" hook for isn't "install this desktop file for me" it's "this defines an application." We've just chosen to use the desktop file format because it has a lot of the data we need. So if the desktop file passed says that this isn't an application, then I don't think we should try to make it into one, as it's a misuse of the hook. If there are other hooks that want to make desktop files with NoDisplay set, I'm cool with that as it's how it's integrated into various tools, but we should leave this click hook for defining applications.