Open saved .mht web archive files in Opera by default.

Discussion in 'all things UNIX' started by Ocky, Dec 10, 2009.

Thread Status:
Not open for further replies.
  1. Ocky
    Offline

    Ocky Registered Member

    Whilst it is well known that Opera natively supports files of the .mht (web archive) variety, there is a small problem.
    To date none of the Ubuntus I have used were able to recognise the mime type out of the box - clicking on a saved .mht file would always open it in gedit. Changing the behaviour via Properties>Open With seems to work but then all text files also open with Opera which is no good.
    So the only solution is to create a new mime type with the Assogiate (File Types Editor) program available in the repositories. Here are some screenshots to illustrate what needs to be filled in.

    File Types Editor.jpg Assogiate General.jpg

    Assogiate Related Types.jpg Assogiate File Names.jpg

    Assogiate File Contents.jpg

    To make it easier to copy the strings in File Contents section, I will reproduce them here:-

    Value: From: <Saved by
    Value: Content-Type: multipart/related;
    Value: boundary="----=_NextPart_
    Value: <!DOCTYPE HTML PUBLIC "-//W3C//DTD

    (Type = String)

    The XML elements section remains as is i.e. nothing to fill in.

    I did touch on this a while ago, but didn't go into detail. :)

    Edit:- The 'default' in my heading is misleading. After doing the above you will need to r/click on a .mht file > Open With and select Opera. All .mht files will then open
    with Opera.
    Last edited: Dec 13, 2009
Thread Status:
Not open for further replies.