Comment 7 for bug 62304

Revision history for this message
Pete Ryland (pdr) wrote :

The only way to reliably fix this is to fix the freedesktop specification. The underlying problem is that there is no clean way that meets the specification to override the NoDisplay attribute of the .desktop file without copying the whole file to the user's applications directory. Matthias's suggestion would be to have arbitrary parts of the system (like the panel, or any other menu consumer for that matter) to change the .desktop files in the user's overrides, which IMHO is simply not appropriate. Consider the use case that the user has manually copied .desktop files from the system ones to ensure they don't get updated with the system's ones. There is no way according to the specification to determine that.

In other words, we can't automatically change something the user may have set manually.

I would suggest one of the following solutions:

1. add in an attribute to the Filename tag of the .menu file format to allow overriding of attributes in the .desktop file. That way, the .desktop file can stay in the system directory, with any overrides (like, the "NoDisplay" config) existing in the user's .menu file.

Something like this:

        <Menu>
                <Name>Accessories</Name>
                <Include>
                        <Filename NoDisplay="False">nautilus.desktop</Filename>
                </Include>
        </Menu>

2. add in an element to the .desktop specification which allows inheriting from the system one, like this:

[Desktop Entry]
Inherit=true
NoDisplay=false

This has similar benefits.

Both of these solutions, however, will take a change to the freedesktop specification.