Description of problem:
In the openbox menu category Administration, items always appear twice, this doesn't happen with other menu categories.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Login to OpenBox and use the menus.
Administration menu items always appear twice.
Should only appear once as in other menu categories.
It looks like the line:
<menu id="administration-menu" label="Administration" execute="/usr/libexec/openbox-xdg-menu system-settings"/>
in the file /etc/xdg/openbox/menu.xml file produces double entries, while the other menu categories seem to work as expected.
If I change the category line in the desktop files to just "System;" (which takes it out of the Administration menu) the items appear correctly once in Applications->System Tools. However the moment you set the category back to appear in the Administration menu with something like "Settings;System;" the app appears in the Administration menu twice.
This issue impacts on a number of launchers when in their default state, including dnfdragora, system-config-language, lightdm-settings and others.
Created attachment 1718628 [details]
patch for /usr/libexec/openbox-xdg-menu
Fixes some items appearing in the same menu more than one.
There are a couple of limitations to this patch.
1. I believe it will prevent the same item from appearing in more than one sub-menu of the same root menu, although I don't think this is a very bad thing.
2. It will prevent an item showing on the menu if it doesn't have a unique name (that is something of the same name is already there).
Someone who has more than 2 hours of Python programming experience can possibly enhance the fix.
I think this should be handled in the pyxdg code. At least, I see there it already has some deduplication implemented.
The thing that's specific to the system-settings menu and what I suspect might be triggering this bug is the inlining of subdirectories. If I remove that part from system-settings.menu, it doesn't return any duplicates.
For me at least openbox-3.6.1-17.fc34 seems to have somehow fixed this issue. It seems fixed in openbox-3.6.1-18.fc35.x86_64 in Fedora 35 beta also.
As an aside, openbox-3.6.1-18.fc35.x86_64 doesn't show up in bohdi, I am guessing Fedora 35 got this one while it was still Rawhide. On another note though, Rawhide's openbox is still openbox-3.6.1-18.fc35.x86_64 (fc35 rather than fc36).
In any case maybe this should be closed if it is fixed for others also.
There was no change in openbox. pyxdg was updated to 0.27, maybe that's fixed it. You can try downgrading to 0.26 and see if it appears again to confirm it.
I couldn't install the one for fc32, I was able to install python3-pyxdg-0.26-12.eln109.noarch.rpm and you are absolutely right, it brought the problem back.
Ok, thanks. I'm closing the bug.