LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2020, 07:30 AM   #1
tekra
Member
 
Registered: Aug 2010
Location: Brisbane, Australia
Distribution: Gentoo, Slackware, PCLOS, Debian
Posts: 230
Blog Entries: 2

Rep: Reputation: 50
Converting MHT files to something useful.


I've a heap of old MHT files from back in the days when Opera was a useful browser. I've just installed the latest version solely in order to use it for opening and converting them, but it's pretty dreadful and has upset the system (Debian 10.1).

I seem to recall that there was a conversion utility, though exactly what it did I can't recall. MHT is a "container" format - somewhat similar to PDF I'd think - so it should be possible to convert an MHT file into an HTML file and a directory containing the "other bits": CSS, Js, images and so forth.

Can anyone recommend a suitable utility?
 
Old 07-01-2020, 07:35 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
According to this, Google Chrome (and probably Chromium, too) as well as Mozilla Firefox with an extension can open MHT files.
 
Old 07-01-2020, 08:06 AM   #3
tekra
Member
 
Registered: Aug 2010
Location: Brisbane, Australia
Distribution: Gentoo, Slackware, PCLOS, Debian
Posts: 230

Original Poster
Blog Entries: 2

Rep: Reputation: 50
> Mozilla Firefox with an extension

Firefox is my default browser, and I've seen this advice elsewhere. It may once have been true but seems to be no longer. My search of Firefox extensions produced no results. You may recall that Ff underwent a major "upgrade" a few years back which was, in fact, a major DOWN-grade: all of the best add-ons disappeared due to major changes in the API (for "security reasons", of course) and few of them have come back.

Not sure about Chrome, and given that Google owns it I'm reluctant to install it, even for offline use.
 
Old 07-01-2020, 08:23 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Then try Pale Moon with this extension. Or Vivaldi.

Last edited by shruggy; 07-01-2020 at 08:26 AM.
 
Old 07-01-2020, 09:12 AM   #5
tekra
Member
 
Registered: Aug 2010
Location: Brisbane, Australia
Distribution: Gentoo, Slackware, PCLOS, Debian
Posts: 230

Original Poster
Blog Entries: 2

Rep: Reputation: 50
Hey, looks interesting! thanks for the tip.
 
Old 07-01-2020, 10:25 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
probably: https://support.mozilla.org/en-US/questions/1273017
 
Old 07-01-2020, 01:18 PM   #7
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 361

Rep: Reputation: 243Reputation: 243Reputation: 243
If you’re willing to use Windows to convert MHTs into something usable in Linux, there is at least one way. If you can’t / don’t want to use Windows, then read no further.

Word is able to open MHT files (in Windows Explorer, right click the file, then Open With), or more specifically I know that the most recent Word desktop app in Windows 10 (and at work we’re still on 1709) is able to open MHT files generated by the MS Office suite apps on my work computer. If you have a bunch of MHTs to convert, to save time, right click on any MHT file, click on Properties, and make Word the default app to open MHTs.

Since most people at work don’t know what an MHT file is, if I have to share a file I have saved as MHT in an MS Office app, I just change the extension to .doc and Word can display that correctly. Note: not .docx, which then opens in Word with messed up formatting.

From Word, you can then Save As several formats including pdf.

TKS

Last edited by TheTKS; 07-01-2020 at 01:28 PM.
 
Old 07-01-2020, 03:18 PM   #9
tekra
Member
 
Registered: Aug 2010
Location: Brisbane, Australia
Distribution: Gentoo, Slackware, PCLOS, Debian
Posts: 230

Original Poster
Blog Entries: 2

Rep: Reputation: 50
Thanks for the list of links, teckk. I was hoping for a commandline solution rather than ANOTHER browser to further complicate my system, and these seem to promise one.

There are a number of online conversion utilities, but I'm always wary of such things due to Zuckerberg's Law:

"If it's online and it's free, then YOU are the product; and you WILL be sold."

MHT and PDF have always disappointed me. Both fulfill an obvious real requirement, but were created by two of the worst corporations in the business. Adobe's PDF utility has always been a nightmare: it takes over the whole system without so much as a by-your-leave, whereas MHT is relatively harmless. A pity that FOSS hasn't produced alternatives to both.

Last edited by tekra; 07-01-2020 at 03:34 PM.
 
Old 07-01-2020, 03:34 PM   #10
tekra
Member
 
Registered: Aug 2010
Location: Brisbane, Australia
Distribution: Gentoo, Slackware, PCLOS, Debian
Posts: 230

Original Poster
Blog Entries: 2

Rep: Reputation: 50
Downloaded unmht and it worked fine - a simple Perl script. Thanks again to teckk for the link.
 
1 members found this post helpful.
Old 07-14-2023, 03:30 PM   #11
coocooc
LQ Newbie
 
Registered: Jul 2023
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by teckk View Post
Thank you teckk!
This command line tool works perfectly with mht files created by Internet Explorer. I've just used it on several files of various age (up to some years old).
The Firefox extensions I found, did not do the job.
 
Old 11-05-2023, 01:50 AM   #12
casting-out-nines
LQ Newbie
 
Registered: Nov 2023
Distribution: Xubuntu
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by tekra View Post
MHT and PDF have always disappointed me. Both fulfill an obvious real requirement, but were created by two of the worst corporations in the business. Adobe's PDF utility has always been a nightmare: it takes over the whole system without so much as a by-your-leave, whereas MHT is relatively harmless. A pity that FOSS hasn't produced alternatives to both.
mht files are identical to mhtml. You can open them in any Chromium-based browser. Like you, I have a ton of old Opera .mht files, and I can open them directly in Falkon. I imagine Brave can read them as well.

An improvement over .mht/.mhtml is the SingleFile add-on, which is available for both Firefox and Chrome. It saves the entire web page, pictures included, as a normal html file that can be opened in any browser. It's what I've been using for the last several years. https://addons.mozilla.org/en-US/fir...n/single-file/
 
  


Reply

Tags
mht



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Linux support for .mht files? maatghandi Linux - Software 14 03-14-2010 07:14 AM
problem with .mht file gaurav pant Linux - Software 2 09-16-2008 04:03 AM
Converting .asx to something useful IncredibleKarma Linux - Software 6 11-25-2007 08:19 AM
Viewing a .mht file seriesx4 Linux - General 2 01-13-2006 08:19 AM
.mht elp Linux - Software 4 04-26-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration