4

I'm trying to open .docx files from the Outlook Web App, viewed in Firefox, with LibreOffice. LibreOffice is installed on my computer and the default application for opening .docx files. What's more, in the preferences->applications of Firefox, I see LibreOffice Writer as the default for Microsoft Word files and don't see any other entry for .docx files. But when I click on an attached .docx file, Firefox asks me whether to download it or open it with gedit. If I manually choose lowriter from this dialog, Firefox doesn't remember this choice and let me pick it afterward.

UPDATE: I noticed something strange - it seems like this doesn't happen for all .docx files, but rather for files whose name starts with a number(for example, 1234.docx).

Files with alphabetical prefixes are opened fine by Firefox (for example, abcd.docx).

Any ideas? I'd love to be able to open these files in one click, instead of downloading them and only then opening them in Writer.

4
  • Have you tried to set .docx file preference from right click menu?
    – fleamour
    Feb 28, 2013 at 12:25
  • @fleamour It's correctly set to LibreOffice Writer.
    – Eyal
    Feb 28, 2013 at 17:05
  • 1
    Eyal, you may also find docs.google.com/viewer (notice the word viewer) useful to generate links to "quickly view documents online without leaving your browser". Not what you're asking for, but maybe helpful, too...? Mar 3, 2013 at 14:23
  • It is useful! In some ways it's more of an answer to this other question I asked about viewing Word docs rather than this one.
    – Eyal
    Mar 4, 2013 at 9:17

1 Answer 1

3

For file types that are not stored in Firefox preferences, Firefox uses your default system settings. Make sure that mime-type for .docx is correctly set in /etc/mime.types and the default application for that is Libre Office.


How to verify settings?

These are the settings for me, you can compare these with yours. I have an entry: application/vnd.openxmlformats-officedocument.wordprocessingml.document docx in /etc/mime.types.
Corresponding to that I have an entry:
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop in /usr/share/applications/defaults.list. Also check ~/.local/share/applications/mimeapps.list for this entry.

Setting the default application

This is already explained in answers to this question.


I have checked everything, still it fails

This may be because Firefox is not able to determine correctly the mime-type for the file. This link gives a detailed explanation of how Firefox determines mime-type for a file. This concerns Mozilla and you should report a bug at Bugzilla.

9
  • Can you detail the steps for doing it. Without that, your answer is vague and incomplete. Feb 28, 2013 at 12:57
  • Detailed steps, help.ubuntu.com/community/AddingMimeTypes
    – Siamore
    Feb 28, 2013 at 13:16
  • My mime.types and defaults.list have the same entries as yours.
    – Eyal
    Feb 28, 2013 at 13:29
  • What does firefox say in the dialog Opening blabla.docx? For me it says You have chosen to open blabla.docx which is a:Microsoft Word Document
    – ignite
    Feb 28, 2013 at 13:58
  • 2
    In that case, Mozilla is unable to detect the mimetype and hence uses application/octet-stream, if you change the entry of application/octet-stream=gedit.desktop, then you will be prompted for a different application.
    – ignite
    Mar 3, 2013 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.