[SOLVED] File Association Issue

Everything about X, Gnome, KDE, ... and everything running on it

[SOLVED] File Association Issue

Postby emariz » 2009-02-04 06:15

I can only de-associate Iceweasel and gThumb from a JPEG, GIF, BMP or PNG by manually editing the MIME types database.
The Remove option to those entries is greyed out in the Open With section.

Now the weird part: If the MIME types database is updated, say I install/remove an application like File Roller, Iceweasel and gThumb are re-associated to the image types.
Another one: If I rename the Iceweasel and gThumb menu entries, I can remove their entries using Open With option. Then their menu and MIME entries are immediately recreated/reverted to their original state.

What could be causing this behaviour?

I'm on a custom Debian Testing AMD64 install and I used the latest (RC2) netinst installer.
I started with gnome-core and kept building my system from there.
Last edited by emariz on 2009-02-10 04:28, edited 1 time in total.
Posts: 2899
Joined: 2008-10-17 07:59

Postby emariz » 2009-02-10 00:57

I recently re-installed OpenOffice hoping that it would solve the Calc crashes (the latest updates did it) and this image MIME issue re-appeared. Somehow, the image association with Iceweasel and gThumb is triggered whenever an application updates the MIME database. Any ideas on how to solve it?
Posts: 2899
Joined: 2008-10-17 07:59

Postby bugsbunny » 2009-02-10 04:01

In /usr/share/applications find the .desktop file associated with the applocation(s) in question. Edit the desktop file, you'll find mime type information in there.

after editing and saving the file(s) run:
# update-desktop-database
The file associations should now be correct.

The next is conjecture on my part.
The removal option is grayed out when there's a system level entry. These are found in /usr/share/applications/mimeinfo.cache

Entries that are added to open with by you are found in ~/.local/share/applications/mimeinfo.cache These can be manually removed via properties.

Ig you don't edit the .desktop files whenever you install an application that updates the mimeinfo.cache file the association will be recreated.

I went through basically the same thing as you a long time ago. Took me quite a while plus some trial and error to figure out how it worked.
User avatar
Posts: 5355
Joined: 2008-07-06 17:04

Postby emariz » 2009-02-10 04:33

I had already edited /usr/share/applications/mimeinfo.cache but your reply has logic (there had to be another file containing the original settings.) I purged File-Roller and all its dependencies and installed it again to test it and it seemed to work.

I'll mark this thread as solved but I'll keep and eye on this for I don't know if my tests were conclusive. Cheers!
Posts: 2899
Joined: 2008-10-17 07:59

Re: [SOLVED] File Association Issue

Postby Johan Adler » 2011-12-24 16:54

I had a similar problem with pdf files in Nautilus 3.2.1 (Debian testing). After installing Adobe Reader 9 from debian-multimedia.org I had the option to open pdf documents with Adobe Reader using the "Open with" menu after right clicking on the file, but choosing properties and tab "Open with" Adobe Reader would not show up.

There were no flaws that I could find in ~/.local/share/applications/AdobeReader.desktop, ~/.local/share/applications/mimeapps.list, /usr/share/applications/AdobeReader.desktop, /usr/share/applications/evince.desktop or /usr/share/applications/mimeinfo.cache (though I did add '%U' to the Exec line of AdobeReader.desktop as suggested here: http://fossplanet.com/f12/nautilus-3-2-1-file-associations-207347/).

I found that a simple change in /usr/share/gnome/applications/defaults.list made the change I was looking for. Searching for 'pdf' in the editor showed me the line 'application/pdf=evince.desktop' that I changed to 'application/pdf=AdobeReader.desktop'. I saved the file and right away it worked the way I wanted it to (no need to log out or restart).

It may not be the canonical way of solving it, but it worked for me.

/Johan Adler
User avatar
Johan Adler
Posts: 2
Joined: 2011-12-24 16:35
Location: Stockholm, Sweden

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 2 guests