Bug 1883202 - Items appear in the Administration menu twice
Summary: Items appear in the Administration menu twice
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pyxdg
Version: 33
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-28 12:15 UTC by Ian Laurie
Modified: 2021-10-06 08:40 UTC (History)
5 users (show)

Fixed In Version: python3-pyxdg-0.27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-06 08:40:18 UTC
Type: Bug


Attachments (Terms of Use)
patch for /usr/libexec/openbox-xdg-menu (762 bytes, patch)
2020-10-03 09:56 UTC, Ian Laurie
no flags Details | Diff

Description Ian Laurie 2020-09-28 12:15:06 UTC
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):
openbox-3.6.1-15.fc33.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Login to OpenBox and use the menus.
2.
3.

Actual results:
Administration menu items always appear twice.

Expected results:
Should only appear once as in other menu categories.

Additional info:
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.

Comment 1 Ian Laurie 2020-10-03 09:56:19 UTC
Created attachment 1718628 [details]
patch for /usr/libexec/openbox-xdg-menu

Fixes some items appearing in the same menu more than one.

Comment 2 Ian Laurie 2020-10-03 10:18:26 UTC
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.

Comment 3 Miroslav Lichvar 2020-10-21 16:06:35 UTC
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.

Comment 4 Ian Laurie 2021-10-06 07:32:05 UTC
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.

Comment 5 Miroslav Lichvar 2021-10-06 07:48:20 UTC
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.

Comment 6 Ian Laurie 2021-10-06 08:38:10 UTC
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.

Comment 7 Miroslav Lichvar 2021-10-06 08:40:18 UTC
Ok, thanks. I'm closing the bug.


Note You need to log in before you can comment on or make changes to this bug.