Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

Thoughts?

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

$ grep "html" /usr/share/applications/*
/usr/share/applications/AptanaStudio3.desktop:MimeType=text/xml;application/xhtml+xml;application/x-javascript;application/x-php;application/x-java;text/x-javascript;text/html;text/plain
/usr/share/applications/defaults.list:application/xhtml+xml=firefox.desktop
/usr/share/applications/defaults.list:text/html=firefox.desktop
/usr/share/applications/firefox.desktop:MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
/usr/share/applications/geany.desktop:MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
/usr/share/applications/gnome-terminal.desktop:X-GNOME-DocPath=gnome-terminal/index.html
grep: /usr/share/applications/kde4: Is a directory
/usr/share/applications/kompozer.desktop:MimeType=text/html;text/xml;text/css;text/x-javascript;text/javascript;application/xhtml+xml;
/usr/share/applications/mimeinfo.cache:application/xhtml+xml=firefox.desktop;AptanaStudio3.desktop;kompozer.desktop;
/usr/share/applications/mimeinfo.cache:text/html=geany.desktop;firefox.desktop;AptanaStudio3.desktop;sublime-text-2.desktop;kompozer.desktop;rstudio.desktop;
/usr/share/applications/mimeinfo.cache:text/x-r-html=rstudio.desktop;
/usr/share/applications/rstudio.desktop:MimeType=text/x-r-source;text/x-r;text/x-R;text/x-r-doc;text/x-r-sweave;text/x-r-markdown;text/x-r-html;application/x-r-data;application/x-r-project;text/x-r-history;text/x-r-profile;text/x-tex;text/x-markdown;text/html;text/css;text/javascript;
grep: /usr/share/applications/screensavers: Is a directory
/usr/share/applications/sublime-text-2.desktop:Comment=Sophisticated text editor for code, html and prose
/usr/share/applications/sublime-text-2.desktop:MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;x-directory/normal;inode/directory;
share|improve this question

3 Answers 3

up vote 3 down vote accepted

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.

share|improve this answer
    
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 http://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.

share|improve this answer
    
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.

share|improve this answer

Your Answer

 
discard

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.