How to avoid duplicate entries in desktop system menu?

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Sat Feb 5 21:10:10 CET 2005


Christian wrote:
> On Sat, Feb 05, 2005 at 07:17:09PM +0100, Benedikt Meurer wrote:
> 
>>> I have noticed, that some programs have duplicate entries in the 
>>> desktop menu.
>>>
>>> E.g. I'm using Debian (testing), and qalculate (a desktop calculator)
>>> has two entries in the desktop menu, both in the Utilities submenu. I
>>> have noticed, that this program has a .desktop file in
>>> /usr/share/applications/ and one in /usr/share/applnk/Utilities/.
>>
>>
>> Easy to explain: The first one results in a desktop-id 
>> "qalculate.desktop", the second one is "kde-qalculate.desktop" (-> 
>> KDELegacyDirs). The two desktop-ids differ and so the `same 
>> application' is displayed twice.
> 
> Sorry, but the content of the two files is identical, and they are both
> named "qalculate.desktop", so how can they have different desktop-ids?

Sorry, I was implicitly referring to the menu-spec
(http://standards.freedesktop.org/menu-spec/menu-spec-0.9.html).

The <KDELegacyDirs> directive, which pulls in the /usr/share/applnk
directory, adds a hardcoded prefix "kde-" to all .desktop files found
below that directory.

>> Its really the applications fault to install two .desktop files. And 
>> if the application maintainer really needs to install two files, then 
>> he should take care that both files will have the same desktop-id in 
>> standard compliant implementations (e.g. installing the first one to 
>> /usr/share/applications/kde-qalculate.desktop or 
>> /usr/share/applications/kde/qalculate.desktop would be the proper 
>> solution).
> 
> Hmm, I have moved /usr/share/applications/qalculate.desktop to
> kde-qalculate.desktop and executed an "xfdesktop -reload", but the two
> entries are still there.

Try rm -rf ~/.cache/xfce4/menu-cache/ and restarting xfdesktop
afterwards. If that doesn't fix the problem, then we have a bug here. ;-)

> Christian

Benedikt

> P.S. Hope this thread is not too off-topic here...

Don't think so...




More information about the Xfce mailing list