Previously when I clicked on an action in a program that opens an HTML file it would open in the browser automatically. However, now instead of opening in the browser, it opens a nautilus window with the HTML file highlighted.

A good example of this problem is when I try to go to the dropbox website. If you use dropbox when you click "Launch Dropbox Website" it takes you to their website directly.

On my computer however, it opens a nautilus window of /tmp and THEN I have to click on open in chrome/firefox. To get it to open up properly.


Update: Updating with results of grep "html" /usr/share/applications/*

$ grep "html" /usr/share/applications/*
grep: /usr/share/applications/kde4: Is a directory
grep: /usr/share/applications/screensavers: Is a directory
/usr/share/applications/sublime-text-2.desktop:Comment=Sophisticated text editor for code, html and prose

It's possible that the hidden file ~/.local/share/applications/mimeapps.list has been corrupted or inadvertently altered. Make a backup of this file just to be safe and then delete the original. Then log out and log back in. The system should recreate this file. For some specialised instances, you may have to "re-train" the system by right-clicking on a file type and choosing "Open with" and then an application to "Always Open with" by checking that option.

  • Mystical, it worked. – Brandon Bertelsen Mar 12 '13 at 23:46
  • TBH, I got the solution here when I ran into the problem at the time I upgraded from 11.04 to 11.10. That time, double-clicking the Trash icon opened Movie Player. – user25656 Mar 13 '13 at 0:39

Sounds like an association for HTML files has gone rogue.

Look in the /usr/share/applications directory which contains a lot of .desktop files that control what launches to what program.

Search for "html" amongst those files and you will see what programs are associated with the html "Tag". Remove only the line that has html and mimetype on it from the relavent file.

There is a nice answer describing the relationship between the files in that directory and their content https://askubuntu.com/a/266317/75967

You can use the grep command to search like grep "html" /usr/share/applications/* in Terminal, if you are not comfortable with Terminal then this answer is not for you. I don't know how to do this via the GUI interface short of creating a dummy file that ends in .html and then seeing what that file is associated with and selecting reset option.

  • Could you be more explicit with an example of what you mean by search for "html"? Searching in Nautilus for "html" in that folder returns nothing. – Brandon Bertelsen Mar 12 '13 at 20:32
  • Amended my answer – Meer Borg Mar 12 '13 at 20:39
  • I'm comfortable with the command line. Just not sure how to interpret the results or how to identify my specific problem given the results (updated answer with results) – Brandon Bertelsen Mar 12 '13 at 20:53
  • Will have a closer look at your file tomorrow, bed time for me, the default list is the key but not in front of my Ubuntu box at the moment, using a iPad – Meer Borg Mar 12 '13 at 21:18

I found another way to work it. GUI method:

  1. Have a sample like trace.html file on system.
  2. Right click the file and choose "open with another application".

    Note: should prompt a box and show recommended applications to open. where if you have like Firefox Web Browser which is not able to open the file by default.

  3. At the bottom of the window click on "Find applications online".

    Note: should open another window asking you to select application to install (nautilus requires to install a software to open HTML file type window)

  4. Now in my case I choose chrome browser and click install.

  5. Now go back to original file and right click now select "Chromium Web Browser" to open the file and it should work just fine.

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.