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?
2 Answers
(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.
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.
Problem solved!
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.
-
-
@PraveenSripati: it should be the same in 11.10. Are you getting the same problem again? Oct 19, 2011 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. Oct 19, 2011 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. Oct 19, 2011 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. Oct 19, 2011 at 16:26