Inconsistent handling of attachments in Thunderbird
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Inconsistent handling of attachments in Thunderbird
I have a puzzling problem. I'm using Thunderbird 188.8.131.52 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.
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?
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:
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.