13

I have one problem. Just look at image: My Problem

So I want to remove one of Dev-C++ IDE and Microsoft Visual Studio Version Selector (I've tried to install Microsoft Visual Studio and it doesn't works,and one of the Dev-C++ IDE too). But I don't know how to change that list. I am using Ubuntu 11.10.

4 Answers 4

15

Enter the contextual menu of the file and go to the Properties of it. Then, go to Open with tab, right click on the application you want to remove and click on Forget association.

5
  • 3
    This does not work for wine applications.
    – To Do
    Nov 17, 2012 at 16:09
  • @To Do, this may help you: askubuntu.com/questions/74266/… Nov 25, 2012 at 22:09
  • 1
    There is no Forget association button in Ubuntu 14.04 (or I can't find it)
    – a06e
    Mar 13, 2015 at 20:33
  • @becko I don't know what kind of patched version does Ubuntu use of nautilus. But the Forget association is definitely there in Nautilus 3.12/3.14. Are you sure you are right clicking into the application you want to forget? Mar 13, 2015 at 20:47
  • This doesn't work for 15.04 Vivid Vervet either Nov 10, 2015 at 11:17
5

Goto ~/.local/share/applications, edit the file mimeapps.list:

In [Added Associations] section, you will find your file extension, something like this:

application/epub=FBReader.desktop;<another apps.desktop>

Which means there are two apps will be shown in "Open with..." menu when right click an epub file, identify the one for Dev-C++ IDE in your case and remove it.

2
  • Thank you. This helped me remove the Wine Internet Explorer/notepad/wordpad options from my "open with" list. Just go to that folder and delete all the wine-extension-*.desktop.
    – Degru
    Nov 1, 2015 at 21:35
  • In my case, the offending associations are not defined in that file.
    – Raphael
    Jan 5, 2018 at 10:38
1

My Ubuntu 14.04LTS does not have a mimeapps.list.

I solved this issue creating a new file in /usr/share/applications called mimeapps.list with the following content:

[Added Associations]
inode/directory=audacious.desktop;pcmanfm.desktop;
[Removed Associations]
inode/directory=baobab.desktop;nautilus.desktop;nautilus-folder-handler.desktop;

In this case, the configuration will remove applications from the context menu of any folder. I got most of the information from here: https://wiki.archlinux.org/index.php/default_applications


UPDATE

I have also found mimeapps.list in ~/.local/share/applications. I guess if you add the same lines to that file, it will work too.

1

Nautilus, Thunar et al. take their information from mimeapps.list files¹.

So the solution is to edit .config/mimeapps.list and/or .local/share/applications/mimeapps.list. Add entries in the [Removed Associations] section like so:

[Removed Associations]
application/xml=firefox.desktop;wine-extension-xml.desktop;
image/png=shutter.desktop;wine-extension-png.desktop;
image/jpeg=shutter.desktop;wine-extension-jpe.desktop;wine-extension-jfif.desktop;  
image/svg+xml=shutter.desktop;wine-notepad.desktop;libreoffice-writer.desktop;gitkraken.desktop;gimp.desktop;wine-extension-xml.desktop;yed.desktop;
application/xml=yed.desktop;

Look here for some details.

You might have to do some digging to find the correct .desktop files; note, for instance, that multiple wine-*.desktop files declared the same application for image/jpeg.


  1. The different mimeinfo.cache files are populated by update-desktop-database from the .desktop files you have around. I don't know how those relate to mimeapps.list; see here.

You must log in to answer this question.

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