LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-04-2009, 04:09 PM   #1
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Rep: Reputation: 31
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.

Needless to say, I'm puzzled.
 
Old 01-05-2009, 02:10 PM   #2
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
Quote:
/usr/bin/xdg-open
???
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.
 
Old 01-05-2009, 02:18 PM   #3
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
It's openoffice 3 and I got it from slackbuilds.org.

The xdg-open will spawn acroread for pdf files. I just noticed when I took another look at the man page that this comes from crossover office.

I'll see what options I have for that, and maybe post a question to the corssover folk.
 
Old 01-05-2009, 05:37 PM   #4
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
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?
 
Old 01-06-2009, 04:57 AM   #5
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
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.
 
Old 01-06-2009, 06:50 AM   #6
GazL
Senior Member
 
Registered: May 2008
Posts: 3,393

Rep: Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921
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
Code:
bash-3.1$ xdg-mime query filetype file.pdf 
application/pdf
when I try and find the default application for it, I get a blank response, though a rc=0.

Code:
bash-3.1$ xdg-mime query default application/pdf 
bash-3.1$ echo $?
0
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.
 
Old 01-07-2009, 07:17 AM   #7
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
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?
 
Old 01-07-2009, 12:23 PM   #8
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
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:

Code:
--B_3313951594_214508
Content-type: application/octet-stream; name="2009 lecture 1 intro.pdf"
Content-disposition: attachment;
	filename="2009 lecture 1 intro.pdf"
Content-transfer-encoding: base64
and for the second I find this:

Code:
--B_3313951594_214508
Content-type: application/msword; name="2009 syllabus(final).pdf";
 x-mac-creator="4D535744";
 x-mac-type="50444620"
Content-disposition: attachment;
	filename="2009 syllabus(final).pdf"
Content-transfer-encoding: base64
Intersetingly, because xdg-open is called to handle the attachment, it is opened with acroread, so xdg-open is working.

So far these munged MIME types have come from MACs. I will keep an eye on it to see what else sends nonsense MIME.

Edit: Found another, this one from a hotmail account. The second attachment has the correct MIME type, but the first does not.

Last edited by statguy; 01-07-2009 at 12:36 PM.
 
Old 01-07-2009, 03:49 PM   #9
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Thunderbird is total crap. Try Claws-mail if you want a really great mail client.
 
Old 01-07-2009, 05:45 PM   #10
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Randux View Post
Thunderbird is total crap. Try Claws-mail if you want a really great mail client.
I'll look into it. I have thousands of saved messages in my local folders. Will I be able to migrate them to Claws-mail?
 
Old 01-08-2009, 12:53 PM   #11
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
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
 
Old 01-09-2009, 09:29 AM   #12
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 326

Original Poster
Rep: Reputation: 31
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.
 
Old 01-11-2009, 11:06 AM   #13
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
claws is a fork of sylpheed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't open attachments in Thunderbird Stevetgn Linux - Software 9 07-12-2011 09:02 PM
Thunderbird doesn't open file attachments with certain characters in the filename make Linux - Software 0 07-31-2008 07:55 AM
Antiword handling attachments on Kmail xri Linux - Software 2 01-12-2006 03:42 AM
Attachments don't open in Thunderbird BroX Slackware 2 06-20-2005 02:43 AM
thunderbird crashes while opening some mails with attachments srmeena Linux - Software 0 10-03-2004 03:35 AM


All times are GMT -5. The time now is 07:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration