Comment 4 for bug 1749728

Revision history for this message
William Geiger (whgiii-q) wrote :

I finally got around to tracking down this problem it seems to be a mimeinfo.cache issue.

If the reader is not familiar mimeinfo is part of the freedesktop and contains all the mime types and their program associations.

for deb packages the primary mime type (called media types now because why not <sigh>} is:

application/vnd.debian.binary-package

with 2 depreciated alternates:

application/x-deb
application/x-debian-package

this is documented @ https://www.iana.org/assignments/media-types/application/vnd.debian.binary-package

the entire mime list is @ http://www.iana.org/assignments/media-types/

these definitions are combined with default applications and put into defaults.list file(s). On my system I have several <sigh>. They are located @:

/etc/g/etc/xfce4/defaults.list
nome/defaults.list
/usr/share/applications/defaults.list
/usr/share/xfce4/applications/defaults.list
/usr/share/xubuntu/applications/defaults.list

now I am not 100% but I believe that the mimeinfo.cache file is created from the default.list (God only knows which one) and updated every time a program/package is installed. This is all part of the Freedesktop/xdg stuff and you can read the docs/specs @ their website.

 On my system I have 2 of these files:

/usr/share/applications/mimeinfo.cache
/home/johndoe/.local/share/applications/mimeinfo.cache

to "fix" the problem with launching gdebi from the Thunar context menu (right mouse menu) I edited the /usr/share/applications/mimeinfo.cache file so the only app association with the deb packages was gdebi.desktop (and of course there are multiple of these on my system <sigh>):

application/vnd.debian.binary-package=gdebi.desktop;
application/x-deb=gdebi.desktop;
application/x-debian-package;

I also modified my in the same manner but it seems that the file in /usr/share/applications/mimeinfo.cache is the critical one for Thunar,

To get Gdebi to work from the opera downloads via open downloaded .deb file I had to add the mime associations to /home/johndoe/.config/mimeapps.list (yea! another MIME file)

Now there is yet another MIME file /usr/share/mime/mime.cache which is a binary file. It can be updated via the command:

$ sudo update-mime-database /usr/share/mime/

I don't know who or what uses it but I am at the tail end of an all-nighter hunting down this bug so I updated it.

There is one more file that should be looked at:

/usr/share/application-registry/gdebi.applications

the last line in the file is:

mime_types=application/x-deb

I changed it to:

mime_types=application/x-deb;application/vnd.debian.binary-package;application/x-debian-package;

not sure if it matters nor if it should be comma separated or semi-colon separated perhaps the package maintainer can chime in.

I hope this is somewhat helpful. If you are reading this and NOT on an xubuntu system you file locations may be different. use your favorite file search utility (I use catfish) and look for "mimeinfo", "defaults.list", "mime", and "gdebi"