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

A few facts: I use Wine. Wine ships its own version of Notepad. For some files, this copy of Notepad has somehow become associated. There is no possibility of me ever actually wanting to open anything in Notepad.

I figure I could try and find out what Notepad is associated with and re-associate that with my editor of choice but that seems deeply tedious. Is there any global way to stop Notepad existing as a method for opening files?

share|improve this question
up vote 37 down vote accepted
  • wine-notepad creates a local mime association for text/plain and some other types in the file ~/.local/share/applications/mimeinfo.cache; this effectively allows it as an alternative to anything gedit (or your default GUI editor) would otherwise open
  • To disable, open ~/.local/share/applications/mimeinfo.cache in a text editor and delete the lines with the MIME types text/plain and text/html
  • Also move/delete wine-extension-txt.desktop and wine-extension-htm.desktop from ~/.local/share/applications/
  • Most text or text-like files should default back to your GUI editor
share|improve this answer
That file was full of filth (split equally between emacs and notepad - neither of which I actually use). Nuked the file and everything seems to default to my editor of choice. Happy. Thank you. – Oli Sep 11 '12 at 11:04
@izx, thx. great help. – bioShark Oct 24 '12 at 0:21
There's no such file for me. – Rápli András Dec 24 '14 at 15:14
I removed all wine extensions files, via: sudo rm ~/.local/share/applications/wine-extension-* – danger89 Nov 17 '15 at 19:59

Removing the associations from ~/.local/share/* will work temporarily, until you install something new and winemenubuilder runs again.

Instead, you may also wish to prevent wine from creating file associations in the first place.

share|improve this answer
For those who would like to keep some menu items and even some file associations created by WINE, it might be a good idea to write a simple script to get rid of some reasonably unnecessary file associations like Notepad only. – Sadi Jan 5 '14 at 12:24
which ones, particularly, would you say are reasonable? opening *.jpgs in MSIE6? :D – K3---rnc Jan 5 '14 at 13:37
All such stupid MS stuff for sure:-D – Sadi Jan 5 '14 at 14:17
Actually it would be useful to be able to disable opening text and image files with MS stuff, but still keep the possibility to launch *.doc and friends with MSOffice installed under Wine... – Maciek D. Jun 30 '15 at 6:00
@MaciekD. You can customize your file-opening preferences arbitrarily. See ~/.local/share/applications/mimeinfo.cache and wine subdirectory in that directory. You can also create totally custom .desktop launcher files to suit yourself as well as have any of the popular desktop environments (Gnome, KDE, Xfce, LXQT) take care of the preferred association for you. No? – K3---rnc Jun 30 '15 at 9:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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