Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] File Association Issue

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
emariz
Posts: 2901
Joined: 2008-10-17 07:59

[SOLVED] File Association Issue

#1 Post by emariz »

I can only de-associate Iceweasel and gThumb from a JPEG, GIF, BMP or PNG by manually editing the MIME types database.
/usr/share/applications/mimeinfo.cache
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.

emariz
Posts: 2901
Joined: 2008-10-17 07:59

#2 Post by emariz »

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?

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

#3 Post by bugsbunny »

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.

emariz
Posts: 2901
Joined: 2008-10-17 07:59

#4 Post by emariz »

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!

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

Re: [SOLVED] File Association Issue

#5 Post by Johan Adler »

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- ... ns-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
Sweden

Post Reply