Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu 11.04 Desktop and when I right click on a particular folder and select "Open With Other Application....", some of the applications are repeated multiple times. This is happening with more than one application. I was able to get rid of them from the "Edit Menu" option, but why does this happen and how to make sure it doesn't happen again?

enter image description here

share|improve this question
    
possible duplicate of Wine pollutes "Open With" application list –  Eliah Kagan Aug 28 at 1:30

2 Answers 2

up vote 1 down vote accepted

As to why it happens, I'm not 100% sure. Sometimes it happens with WINE applications due to some difficulties in setting up the .desktop files and the appropriate associations.

It is a known problem however, and it hopefully should be fixed in the near future.

To solve the problem for yourself, remove the duplicate entries in: ~/.local/share/applications, and it should be fine. Most of the time when you do this once you won't have to do it again until you reinstall the application in question.

share|improve this answer
    
Roland - how do I do the same with Ubuntu 11.10? –  Praveen Sripati Oct 19 '11 at 6:17
    
@PraveenSripati: it should be the same in 11.10. Are you getting the same problem again? –  RolandiXor Oct 19 '11 at 14:31
    
mimeapps.list is the only file in the ~/.local/share/applications folder. And mimeapps.list doesn't contain much information in it. –  Praveen Sripati Oct 19 '11 at 15:22
    
@PraveenSripati: Did you do a fresh install of 11.10? If you did that is why. The point is, the solution remains the same, but on a fresh install you won't see anything. –  RolandiXor Oct 19 '11 at 15:28
    
I did a fresh install of 11.10 and installed okular, the problem of multiple open-with still persists in 11.10. –  Praveen Sripati Oct 19 '11 at 16:26

(For the solution, skip to the bottom. I'll explain some technical details in case it's useful to someone trying to understand why it happens.)

The problem is that there are multiple .desktop files for that program with different filenames in applications directories.

In Ubuntu, applications directories are:

~/.local/share/applications
/usr/share/applications

For example, on my system, there are three entries for Banshee in /usr/share/applications/:

/usr/share/applications/banshee.desktop
/usr/share/applications/banshee-audiocd.desktop
/usr/share/applications/banshee-media-player.desktop

which results in three entries for Banshee in the Open With Other Application... dialog.

Three Banshees

One solution is deleting the extra .desktop files, but that could break opening other file types (for example, banshee-audiocd.desktop is used to open audio CDs).

The right solution is adding a Hidden=true line to these duplicate .desktop files in /usr/share/applications/. However, I don't recommend you do it because it requires messing with system files owned by root (this fix should be there by default).

So, what can you do until this is fixed in Ubuntu?

Solution

Remember I said with different filenames in the beginning? That's because .desktop files in ~/.local have higher priority over system-wide .desktop files with the same name. So, copy the entries you want to get rid of from /usr/share/applications to ~/.local/share/applications and add Hidden=true to them.

Edit the .desktop files

Problem solved!

Problem Solved

share|improve this answer

Your Answer

 
discard

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.