Installing Wine brings notepad in the Open with - context menu of the file manager.

How to remove Notepad option from the context menu of the File manager?

enter image description here

2 Answers 2


As posted in this askubuntu 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"

What I did (as also said in a comment under that answer): deleted altogether the file ~/.local/share/applications/mimeinfo.cache. "everything seems to default to my editor of choice".


From the image you provide, it seems that the behavior you encounter is with text files (.txt). IF it is such, then you can modify the list of "Open With" applications in the context menu like so:

In a terminal, go to: /usr/share/applications then do:

sudo scratch-text-editor mimeinfo.cache

There, find the line containing the string text/plain. Change the list of associations to whatever you want (notepad should appear there so you just edit accordingly). Save and exit.


sudo scratch-text-editor defaults.list and repeat the operation from above.

  • The idea would be to remove notepad from any context menus. - Also: /usr/share/applications/mimeinfo.cache and /usr/share/applications/defaults.list do not contain notepad anywhere. This is different from just file association.
    – user170
    Commented Jan 27, 2016 at 12:26
  • askubuntu.com/a/186501/47206
    – user170
    Commented Jan 27, 2016 at 12:29
  • the problem is ` ~/.local/share/applications/mimeinfo.cache`.
    – user170
    Commented Jan 27, 2016 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.