[SOLVED] Obmenu-generator 20 krita entry

Hello !
After installing Krita, I get 20 krita entries in the jgmenu Office submenu (ie when clicking on the top left rocket menu icon).

I tried to reinstall krita and run obmenu-generator, but the 20 duplicate menu entries are back …

Any solution ?

I found a solution
when looking in /usr/share/applications I have :
krita_brush.desktop
krita_csv.desktop
krita_exr.desktop
krita_gif.desktop
krita_heif.desktop
krita_heightmap.desktop
krita_jpeg.desktop
krita_kra.desktop
krita_ora.desktop
krita_pdf.desktop
krita_png.desktop
krita_ppm.desktop
krita_psd.desktop
krita_qimageio.desktop
krita_raw.desktop
krita_spriter.desktop
krita_svg.desktop
krita_tga.desktop
krita_xcf.desktop

So I removed all this krita*.desktop files but one
Ran obmenu-generator again, and now it’s working, I only have one Krita menu item

But why installing krita produces all this .desktop files instead of one ?

Looks like there is a shortcut for all the image files krita supports.

This change will be reverted the next time Krita is updated.

Try this instead:

mkdir -p ~/.local/share/applications
cp /usr/share/applications/krita_*.desktop ~/local/share/applications
for f in ~/.local/share/applications/krita_*.desktop ; do echo "Hidden=true" >> $f ; done

obmenu-generator should then hide all of the extraneous entries if you run it again.

Thanks for this solution ! (but it doesn’t work for now)
I guessed it would reappear after the next update.

I tried your solution with okular (same problem).

I now have many org.kde.mobile.okular_*.desktop in my ~/.local/share/applications directory
each have Hidden=true at the end of the .desktop file
But when I run obmenu-generator, they are still many duplicates

Inspired by your solution I tried to append NoDisplay=true
but it doesn’t work neither

Yes, that’s the one! Sorry for my silly error but I don’t currently use any menu systems :blush:

https://wiki.archlinux.org/index.php/Desktop_entries#Hide_desktop_entries

That should work, at least with XFCE’s menu and suchlike, but perhaps obmenu-generator does things differently.

I think jgmenu can read directly from the .desktop files and should hide the entries if configured so.

@zoloo The jgmenu issue has been addressed by @malm on this topic thread…

So... JGMenu Text color? Empty Tray?

Please use the forum’s search function before opening a fresh topic whenever possible.

Thanks. :slight_smile:

1 Like

I am confused, is this an obmenu-generator issue or a jgmenu issue?

jgmenu is the menu included by default in the top left, obmenu-generator is a separate application that creates a menu for openbox (right click) menu.

1 Like

@zoolo

I pushed a fix to the jgmenu pmenu module. It is not included in v1.3, but will be in the next release.

In the mean time, you could use the lx module (set csv_cmd = lx) or patch your pmenu module as described in the other thread that @anon37345411 referred to.

I was presuming this is an obmenu-generator issue and the OP was describing the Openbox main menu but perhaps I was mistaken.

@OP: as an alternative to my (rubbish) .desktop files suggestion you could instead add the unwanted files to the NoExtract array in /etc/pacman.conf — this would then prevent the files from re-appearing after a package upgrade.

See pacman.conf(5) and the ArchWiki for more on this.

THANKS a lot ! Problem fixed

My bad, I (wrongly) guessed that it was an obmenu-generator problem (I thaught jgmenu entries were generated by obmenu-generator), so I did search, but didn’t found any relevant result.

The problem was with jgmenu and the @malm fix that @anon37345411 referred to did work.

Sorry to have bothered all of you, and many thanks for the reactivity anyway.

Should I edit the title of the post ?

3 Likes

That s cool, please mark it as solved.

It’s never a bother man, we love this stuff and we’re happy you got it all sorted :grin:

You may but actually, it’s even more helpful to others if you mark which comment was most helpful to you, using the check mark icon within each comments toolbar… I’ll just assume @malm’s post did the trick and mark this one for you so you see what I mean :wink:

I have Krita in appimage and currently in the 1st execution it asks if we want to add a shortcut in the main menu, I think the appimage sensational for running in isolation, Openbox and KDE do not match. :grin:

Yes, the only applications which appear in multiple menu occurrences are KDE programs indeed.

1 Like