Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-04-2009, 04:09 PM
|
#1
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Rep:
|
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. 
|
|
|
|
01-05-2009, 02:10 PM
|
#2
|
|
Member
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14 x86_64
Posts: 652
Rep:
|
???
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. 
|
|
|
|
01-05-2009, 02:18 PM
|
#3
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
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.
|
|
|
|
01-05-2009, 05:37 PM
|
#4
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
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?
|
|
|
|
01-06-2009, 04:57 AM
|
#5
|
|
Member
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14 x86_64
Posts: 652
Rep:
|
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.
|
|
|
|
01-06-2009, 06:50 AM
|
#6
|
|
Senior Member
Registered: May 2008
Posts: 2,843
|
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.
|
|
|
|
01-07-2009, 07:17 AM
|
#7
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
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?
|
|
|
|
01-07-2009, 12:23 PM
|
#8
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
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.
|
|
|
|
01-07-2009, 03:49 PM
|
#9
|
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Thunderbird is total crap. Try Claws-mail if you want a really great mail client.
|
|
|
|
01-07-2009, 05:45 PM
|
#10
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
Quote:
Originally Posted by Randux
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?
|
|
|
|
01-08-2009, 12:53 PM
|
#11
|
|
Senior Member
Registered: Feb 2006
Location: Siberia
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
|
|
|
|
01-09-2009, 09:29 AM
|
#12
|
|
Member
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 13.37, 12.2
Posts: 310
Original Poster
Rep:
|
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.
|
|
|
|
01-11-2009, 11:06 AM
|
#13
|
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
claws is a fork of sylpheed.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:28 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|