Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have Xfce and in Thunar file association are changing randomly, to wine applications like jpeg and png to Internet Explorer and mp3 to Windows Media Player. I change it back to gpicview and Totem and after a while, when I click on the file it starts up wine again (which takes forever to load, and IE doesn't even work, and gives an error when it loads).

How can I make my file association changes permanent, and stop them changing to wine software?

share|improve this question

marked as duplicate by cipricus, Eric Carvalho, David Foerster, Luís de Sousa, kos Feb 8 at 16:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 6 down vote accepted

The very useful wine FAQ contains details on how to clean the open with menu. I can confirm that it works safely on Xfce and will on any other desktop environment, as the locations that wine installs the items to are standard locations for those types of files as delineated at

The commands below are from the Wine FAQ and do safely remove all open-with entries from the context menu, but they do not remove any wine entries from the applications menu, which I think is just what you want. If you need to see what they will remove, place echo before the rm command, and it will list the changes. You should run each command individually and not copy and paste the whole block, in case you make a mistake.

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* 

It should also be said that when you install a wine program, further new entries will be created, so these commands will need to be run again. The only way to permanently stop the creation of these items is to disable winemenubuilder, but that also affects application menu items and not just the open with menu, so you might not want to do that. See the wine FAQ for more details on that.

If you want to run the commands above after installing a new wine program, it would be best to put them in a script, make it executable (chmod u+x) and bind it to a shortcut key. Then you can run the script regularly and keep the open with menu clear of wine entries at all times.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.