Ubuntu – Remove Wine’s Notepad from “Open With” options

file associationmime-typewine

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?

Best Answer

  • 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
Related Question