45

The dialog box in question here is the one you get with the context menu option "open with other applications". Wine seems to have inserted more than a dozen or so entries for each application I install, which makes it a pain to find the correct application:

alt text

What can I do to remove the duplicates?


Update: Neither of the two solutions really work. The bug is interesting, but the symptoms does not match my problem (I'm not having problem with uninstalling applications, but rather the things that are inserted after installing them), and with the other one, all references to the Wine application are removed, which actually makes the problem worse (although it may be an acceptable solution if nothing else can be found). So this is still an open question; any takers?

3
  • 4
    I think you should report this bug at Launchpad.net
    – DrKenobi
    Nov 5, 2010 at 4:12
  • The same Wine component (winemenubuilder) is responsible for both problems, the one at the launchpad bug and the one you're having. A fix is in progress at winehq, but it was in part blocked by a bug in Ubuntu that I've now taken care of: bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/602799 Mar 31, 2011 at 1:17
  • @Yi Jang (intentionally misspelled so the SE won't remove it) are you still looking for an answer?
    – user595510
    Nov 29, 2016 at 16:02

4 Answers 4

21

Remove wine*.desktop files from ~/.local/share/applications and edit ~/.local/share/applications/mimeinfo.cache

If you're feeling lazy you can just run:

sed -i '/wine/d' ~/.local/share/applications/mimeinfo.cache

and:

rm -r ~/.local/share/applications/wine*  

or all in one line:

rm -r ~/.local/share/applications/wine* ; sed -i '/wine/d' ~/.local/share/applications/mimeinfo.cache 
4
  • Anyway to do this a program, I have about 100 duplicates
    – Will
    Oct 10, 2010 at 9:29
  • 2
    it could be done on the command line using rm ~/.local/share/applications/*<insert most of the name of the duplicate here>.desktop
    – RolandiXor
    Mar 13, 2011 at 19:30
  • Thanks. I had another (probably redundant) subdirectory "wine" in ~/.local/share/applications/, and after checking the file modif date of the *.desktop files in this dir ~/.local/share/applications/wine, I decided to remove this directory and all files inside. I suspect it came from an older ubuntu distri (now I'm on 12.04). After deleting, a lot of duplicates were gone. I was not able to remove them thru alacarte.
    – knb
    Oct 18, 2012 at 8:09
  • 1
    It works, but after doing this I seem to have lost the ability to open certain files with WINE programs by simply double clicking on them, which is kind of a pain... Nov 26, 2015 at 14:06
9

It's a known problem. Here is the associated launchpad bug: https://bugs.launchpad.net/ubuntu/+source/wine1.2/+bug/420089

Unfortunately it's not an easy problem to fix in Wine (or Gnome), because there isn't a good way for figuring out when an application has been removed.

3
  • 2
    I should note that I have been having an ongoing discussion with the author of winemenubuilder about how to correctly solve this problem (as well as obsolete entries in the start menu) Mar 9, 2011 at 12:22
  • I've seen success in getting menu entries removed, but the bug still persists in some ways.
    – RolandiXor
    Mar 13, 2011 at 19:29
  • It has a easy fix .
    – Lincity
    May 8, 2011 at 9:08
5

Just found this post on webupd8: http://www.webupd8.org/2010/12/fix-open-with-menu-when-using-ms-office.html#more

Just right click the Ubuntu Menu Logo, select "edit menu" and remove unused entries under "other".

1
  • This post was helpful. Although, in Ubuntu 11.04 you can't right-click on the menu, you have to either have to hit super (windows key) and type Main Menu, or run "alacarte" from command line.
    – Gruzzles
    Jul 20, 2011 at 4:03
0

This should work: https://wiki.winehq.org/FAQ#How_do_I_clean_the_Open_With_List.3F

rm -f ~/.local/share/mime/packages/x-wine*
rm -f ~/.local/share/applications/wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
rm -f ~/.local/share/mime/application/x-wine-extension*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .