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?

2 Answers 2

  • 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
  • 5
    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, 2012 at 11:04
  • @izx, thx. great help.
    – bioShark
    Oct 24, 2012 at 0:21
  • There's no such file for me. Dec 24, 2014 at 15:14
  • 2
    I removed all wine extensions files, via: sudo rm ~/.local/share/applications/wine-extension-* Nov 17, 2015 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.

  • 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, 2014 at 12:24
  • 1
    which ones, particularly, would you say are reasonable? opening *.jpgs in MSIE6? :D
    – K3---rnc
    Jan 5, 2014 at 13:37
  • All such stupid MS stuff for sure:-D
    – Sadi
    Jan 5, 2014 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, 2015 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, 2015 at 9:13

You must log in to answer this question.

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