Inconsistent handling of attachments in Thunderbird
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Inconsistent handling of attachments in Thunderbird
I have a puzzling problem. I'm using Thunderbird 2.0.0.18 on Slack 12.2. The handling of microsoft office attachments is inconsistent (I've only noticed the problem with MS files).
Sometimes when I double click an attachment the default choice is "Open with /usr/bin/xdg-open" and when I click OK, the file opens in OpenOffice. In this case the dialog says I am opening a "Word document."
Sometimes, the default choice is "Save to Disk." I have the option to "Open with" but I would need to "Browse" for the application. In the example I'm looking at the dialog (correctly) identified the file as a "PowerPoint presentation."
Finally, sometimes I am only "allowed" to save the document. In this case the file was also (correctly) identified as "Word document."
So, it appears that the MIME types are correctly being identified but with very different behaviours.
???
Where did you get OOo from (and which version)?
I'm running SW 12.1 with OOo 3, but I have to choose for /usr/bin/openoffice.org3.
/usr/bin/xdg-open doesn't do anything here, doesn't even exist.
I did a little more digging and found that xdg-open is part of the xdg-utils package (I still forget how easy it is in slack to find what package a file came from just by using a single grep). There is also a version that comes with acroread 8. Anyone know what the consequences might be of removing the xdg-utils package?
Uninstalling the package doesn't seem to give you too much trouble, as it is not an original SW package in the first place.
There is always the possibility that xdg-utils messes things up in TB. You'll find out soon enough if you uninstall.
If it doesn't, you can always reinstall xdg-utils, no harm done.
xdg-utils is part of the stock install (at least with 12.2). The entries in /etc/mailcap also seem to call xdg-open so any old programs that use mailcap could fail to open external apps if you remove the xdg-utils package.
I've just been having a play with it on my system and mine appears to be broken too.
(Note: I don't have any of the KDE packages installed, as I just use WindowMaker and pcmanfm).
I've done a quick bit of testing and what I've noticed is that although xdg-mime query returns the right mimetype for a pdf
If I try and open a pdf with "xdg-open file.pdf" it starts firefox which then pops up the save file dialog. Strangely, using the pcmanfm to open the same file will start xpdf as it should as per the contents of the /usr/share/applications/xpdf.desktop file
Either something is wrong with xdg-open, or I'm misunderstanding this stuff, which is quite possible, I've read the man pages which aren't that informative, /usr/doc/xdg-utils has virtually nothing of interest and looking at the freedesktop website just overloads you with data. This entire mime handling thing seems completely overcomplicated. At least the old mailcap file way of doing things was understandable at a glance.
I now think that Thunderbird is the culprit. I looked at its config and saw that it uses mailcap. So, I commented out the lines in /etc/mailcap. I got approximately the same behaviour. Sometimes I would be prompted to choose between saving an attachment and opening it with an application (I now had to choose the app. since xdg-open was out of the loop) and sometimes I was only prompted to save the file.
Something that may or may not be relevant in my case. Although I did a fresh install of 12.2, I previously had OpenSUSE 10.2. I reformatted my root partition but left my /home partition alone. I wonder if I have some old (local) Thunderbird configuration that is messing things up. What is the profile specific configuration file and if I remove it, will a default one be created the next time I start Thunderbird?
After looking at some stuff in the Thunderbird KB, I deleted my mimeTypes.rdf. I still find some attachments that I should be able to open directly, I cannot. However, the message in the "save only" dialog prompt me to look further. It appears that the messages I'm having trouble with have the wrong mime-types for the attachments. I can see this by looking at the message source.
For example, in one message with two PDF attachments, I can open the second but not the first I have this for the first:
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
I'm not sure but Claws can read many different types of mail directories. Ask on the newsgroup if you don't see anything in the user manual or faq. claws-mail.org
I just remembered something. A number of years ago I used a mail client that was called (I think) Sylpheed Claws. Is this Claws client a more mature version of that?
In any case, for now I have customized my ~/.mailcap for my immediate needs (since Thunderbird uses the mailcap files) and commented out the xdg-open lines in /etc/mailcap. This is due to the potential security vulnerabililty present with xdg-open.
It appears my attachment difficulties came from wrong MIME types in the messages themselves.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.