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?

Yi Jiang
  • 1,206
  • 4
    I think you should report this bug at Launchpad.net – DrKenobi Nov 05 '10 at 04: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: https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/602799 – Scott Ritchie Mar 31 '11 at 01:17
  • @Yi Jang (intentionally misspelled so the SE won't remove it) are you still looking for an answer? –  Nov 29 '16 at 16:02

4 Answers4

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 
desgua
  • 32,917
borjacampina
  • 1,054
  • Anyway to do this a program, I have about 100 duplicates – Will Oct 10 '10 at 09: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 '11 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 '12 at 08: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... – gilbertohasnofb Nov 26 '15 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.

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".

  • 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 '11 at 04: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*