Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a very specific question. I'm a lawyer from Chile, the thing is we use a webpage to check on the state of our judiciary cases.

The problem when I started using Ubuntu (and Chromium) is that when I clicked a word document in the web-portal it didn't give me the option is viewing it in the browser. Moreover, it gave me the option of downloading it, but the extension of the file instead of being .docx was .do by default (and the file name is always It took me a while to figure out that if I added the .docx to .do I could download and open the word document (which is a lot of trouble considering the number of files I need to check constantly and not save in my PC). PDF documents could downloaded correctly, but no opened in the browser.


I thought that using Chrome instead of Chromium would fix the problem, but it only helped with the PDF files, not the .docx ones.

If you wish to try the website and check the problem, either go directly to this page or browse from by entering "Rol Interno: C-18271-2011" and "Tribunal de Origen: 4° Juzgado Civil de San Miguel" (at the bottom) and then clicking "Consulta". Don't worry, this information is public and I'm only using it as an example so you can help me with the .do files.

share|improve this question
You cannot open docx files in browsers generally. Did you used to be able to do this at some point? Or are you talking about opening it with a web-based application such as Google Docs or the online-based Microsoft cloud platform? – Sparhawk May 1 '13 at 1:56
When I used windows and clicked the file it gave me the option to "open" the file and not only download it. That way I could open it whith Office and didn't need to save it. – Pablo Viollier May 1 '13 at 1:59
Ah, I misunderstood. You don't want docx files to open and display within the browser, but you want the browser to pass the file to Libreoffice, and open it there. I tried the above webpage in Chromium and Firefox and they are all named as you say. Nevertheless, on my system, they were recognised as Libreoffice files. Firefox automatically opened it, and Chromium saved it. However, I then could double-click on the file in the download manager, and it opened from Chromium. – Sparhawk May 1 '13 at 2:10
I'm not sure how to make Chromium automatically open files, but there should be a way? Otherwise, an alternative might be to use Firefox. – Sparhawk May 1 '13 at 2:10
@ændrük, having said that, my system automatically opens them in Libreoffice, so they can be recognised without greasemonkey, etc. – Sparhawk May 1 '13 at 2:46
up vote 2 down vote accepted

.do is a web extension, not the file you are after downloading. In this case the link you are clicking that ends in .do should be pushing the docx but your browser is being handed the .do file itself.

You can test this by opening the developer tools (menu, tools, developer tools) then click on the timeline tab. When you click the link for your file you should get a delivery code of 200 (success) and the file name that was delivered. In this case it will be the .do file.

Short version: The file being delivered is .do instead of .docx. You can try renaming to .docx, but we have no way of knowing if that will do anything for you as we don't know what is actually being delivered.

share|improve this answer

The issue of "opening" files without having to save them first has been under discussion since 2009. There's currently no simple way to do it.

The closest you can get is to instruct Chrome to automatically open files of a certain type after saving them:

Always Open Files of This Type - Chromium

As long as you haven't configured Chrome to ask where to save each file, this should allow you to view the documents with one click.

There are still two annoyances with this approach:

  • Your downloads folder will become cluttered.
  • A blank window will appear every time you download a file.

You can mitigate the latter by middle-clicking (or Ctrl+clicking) the links to open new tabs instead; Chrome will close the empty tabs automatically.

share|improve this answer
+1, but I guess the real answer is "use Firefox". :p – Sparhawk May 1 '13 at 5:51
Exactly the answer I needed - thanks :) – lobner Jun 26 '13 at 12:22

Download the file, rename it to add the extension of .docx, and then double click the file from "nautilus" the file browser to open it in libreoffice. As far as I know, the file would not open directly in browser.

share|improve this answer
Is there some way I don't need to rename the file to .docx every time? What's the reason Windows users don't need to do it? – Pablo Viollier May 1 '13 at 1:53
Usually Ubuntu also does not require the renaming, as the chromium would download the file with correct extension. I don't understand why in your case it should download it with different extension. I don't know the fix, but I suggested a workaround. – May 1 '13 at 1:57
As I stated in the comments on the question, the website itself provides with incorrect suffixes. – Sparhawk May 1 '13 at 2:16
Its clearly a website issue. Nothing can be done on Ubuntu's side to get rid of this problem. You must download and rename manually. AFAIK. – May 1 '13 at 2:17
As above, my system automatically opens them in Libreoffice without renaming them manually, so it's definitely possible. (I use Firefox + Kubuntu.) It also works with xdg-open, which might be desktop-environment agnostic? (Not sure.) – Sparhawk May 1 '13 at 2:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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