Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Linux - open PDF attachments in external system viewer

  • 5 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 146 views
  • Last reply by Paul Littlefield

I am using Thunderbird 91.0b3 (64-bit) on Linux Mint 20.1 running XFCE 4.14.3

I am trying to set TB to open a PDF attachment in the external system viewer Xreader.

I have tried the following:-

1) edited the mimeTypes.rdf file with the correct lines for a PDF (https://termbin.com/qwpf).

2) deleted the mimeTypes.rdf file and tried to set it in Preferences.

3) edited user.js

In Firefox there is a well documented way (https://support.mozilla.org/en-US/kb/view-pdf-files-firefox) to set this up but I could not find the same for Thunderbird... why not?

Which magic file is it??

Is it mimeTypes.rdf or user.js or handlers.json ?!

Hope anyone can help.

Paully

I am using Thunderbird 91.0b3 (64-bit) on Linux Mint 20.1 running XFCE 4.14.3 I am trying to set TB to open a PDF attachment in the external system viewer Xreader. I have tried the following:- 1) edited the mimeTypes.rdf file with the correct lines for a PDF ([https://termbin.com/qwpf https://termbin.com/qwpf]). 2) deleted the mimeTypes.rdf file and tried to set it in Preferences. 3) edited user.js In Firefox there is a well documented way ([https://support.mozilla.org/en-US/kb/view-pdf-files-firefox https://support.mozilla.org/en-US/kb/view-pdf-files-firefox]) to set this up but I could not find the same for Thunderbird... why not? Which magic file is it?? Is it '''mimeTypes.rdf''' or '''user.js''' or '''handlers.json''' ?! Hope anyone can help. Paully

Paul Littlefield மூலமாக திருத்தப்பட்டது

தீர்வு தேர்ந்தெடுக்கப்பட்டது

Just for a laugh, I thought that I would try something daring...

... use Firefox to set up the handlers for various attachments, including PDF files and then copy the handlers.json file to my Thunderbird profile directory.

Guess what?

It worked.

I can't stop laughing but I hope it helps someone else ;-)

In fact, here is a copy of handlers.json file so that I can be really helpful to people...

https://termbin.com/8fd1

Go me.

Read this answer in context 👍 0

All Replies (5)

Lets start at the beginning... Edit no file in Thunderbird settings with a text editor unless you want failures. There is a lot of code in the user interface to try and make sure the settings entered are sane, no setting boolean values to A for instance or other gibberish. There is nothing but careful copying in a text editor, and then you have to trust your source got it right. While it is a time honored process on Linux (and a very large contributor to it's limited uptake IMO) it is not a recommended approach in Thunderbird.

The Options/Preferences provide a GUI for managing Media types. What is the problem with using it. Your explanation does not really provide anything as to what the issue was, just you tried it.

Note here that the mimetype is used to identify the handler in the case of PDF application/pdf, so if the email uses gibberish than the correct handler will never be selected. It is a common issue with Microsoft development environment developers to fail entirely to understand media types and use gibberish because "it works" on outlook which uses file extensions exclusively to identify handlers. One example of generic and troublesome coding can be seen here https://stackoverflow.com/questions/20163864/what-mime-type-to-use-as-general-purpose where the well meaning individual advises that a generic application/octet-stream will do for attachments. If fact that application/octet-stream will be treated as a binary data stream and no helper application can be associated so it is save and open only. Even if the file name was specified as myfile.pdf

If it is email from a particular source or sender that is the issue rather than all instances of the file type always suspect poorly formed and encoded email in the first instance. There is a lot of it out there. Mostly from reporting systems, routers, IIOT, server logs and web sites using scripts to generate email.

This image is from the release version. I note that the daily build has an option to preview within the application, so I guess that is a recent addition that will see release in the next version. Bug 810815 is the probable source of this. It has a number of regressions and other bugs associated. I have no idea if your issue is in there are you actually have not said what it is.

I am using Thunderbird 91.0b3 (64-bit) on Linux Mint 20.1 running XFCE 4.14.3

So you are using beta software heavily affected by the removal of RDF project. Does the mimetypes.rdf even apply to the beta version? My understanding is the entire file has been replaced with a Json file called handlers in the V61 timeframe. https://bugzilla.mozilla.org/show_bug.cgi?id=474043

Is it mimeTypes.rdf or user.js or handlers.json ?!

None of them.

In Firefox there is a well documented way (https://support.mozilla.org/en-US/kb/view-pdf-files-firefox) to set this up but I could not find the same for Thunderbird... why not?

Because I, for one, never actually though instructions would be needed to drive selections from a drop down list in the user interface. What is there really to say go here, click action and choose your poison. Or even easier, just delete the action and be asked when the next file of that type appears what should be done.

Would you have found an article talking about media types (the correct term these days, not mime type) as any article I wrote would be discussing media types not any particular file extension as the file extension is actually not relevant in this context. Firefox have an article talking about on of the 1449 registered types. I would argue that is really worse than nothing unless you are specifically searching for that file type.

Hello Matt,

Thanks for your frank reply.

I have been using Mozilla Thunderbird for over 15 years and have posted on this official forum in order to help and seek some answers.

I have also helped to shape some of the GUI with tickets on Bugzilla, which is why I have chosen to use the Beta version of the software.

That said, this particular issue of mine with PDF attachments is small but relevant and needs addressing.

Please find attached a screenshot of my part of the 'Files & Attachments' section which (unlike yours) shows no option for PDF files... and there is no option to add anything to it.

I can open a PDF file but using my system File Manager or the system PDF viewer.

However, If I open the PDF attachment from the Thunderbird email message it shows directly within TB and most of the time does not render properly... so I have to save it out of TB, then open it in my Linux distro PDF viewer.

It would be better if I could actually open it using that system viewer in the first place.

When I right-click or double-click on the PDF attachment, it does not offer me any way to change the handler.

Hence, my request to find some 'other' way of getting TB to open PDF files in an external viewer.

I am sure I am not the only person with this problem, but if I am then great.

If I have edit a JSON file, or edit the about:config settings so be it...

..but please, give me some simple, helpful suggestions which might actually fix my issue.

Thanks.

Paul Littlefield மூலமாக திருத்தப்பட்டது

தீர்வு தேர்ந்தெடுக்கப்பட்டது

Just for a laugh, I thought that I would try something daring...

... use Firefox to set up the handlers for various attachments, including PDF files and then copy the handlers.json file to my Thunderbird profile directory.

Guess what?

It worked.

I can't stop laughing but I hope it helps someone else ;-)

In fact, here is a copy of handlers.json file so that I can be really helpful to people...

https://termbin.com/8fd1

Go me.

Paul Littlefield மூலமாக திருத்தப்பட்டது

'

Paul Littlefield said

Hello Matt, Thanks for your frank reply. I have been using Mozilla Thunderbird for over 15 years and have posted on this official forum in order to help and seek some answers. I have also helped to shape some of the GUI with tickets on Bugzilla, which is why I have chosen to use the Beta version of the software. That said, this particular issue of mine with PDF attachments is small but relevant and needs addressing. Please find attached a screenshot of my part of the 'Files & Attachments' section which (unlike yours) shows no option for PDF files... and there is no option to add anything to it. I can open a PDF file but using my system File Manager or the system PDF viewer. However, If I open the PDF attachment from the Thunderbird email message it shows directly within TB and most of the time does not render properly... so I have to save it out of TB, then open it in my Linux distro PDF viewer.

Then you may have identified a Linux bug.... have you filed a bug report? I could not find anything this morning when I looked.