Linux.com

Feature: Reviews

CHM viewers for Linux

By Federico Kereki on November 30, 2007 (7:00:00 PM)

Share    Print    Comments   

Even if you work only in Linux, you'll likely have to use Microsoft Compiled HTML Help (CHM) files at one time or another. Several open source projects use this common format, including Apache, MySQL, PostgreSQL, Python, and PHP.

Microsoft developed CHM as a proprietary format for Windows 98, leaving behind the previous WinHelp (HLP) format. CHM is still alive and kicking in XP and Vista, though some applications use the newer Microsoft Help 2 format.

CHM files comprise a set of Web pages, plus a hyperlinked table of contents and an index, compressed with LZX. CHM offers small size (because of compression), full text searches, and the ability to join several CHM files into a single file with a common table of contents and index.

Even though CHM is a Microsoft format, several projects have written CHM file viewers for Linux.

KchmViewer

KchmViewer is the standard KDE viewer for CHM files. The current production version 3.1 was released in June, though version 4.0 is now available in beta; I tested the former. It's released under the GNU General Public License (GPL), and it uses some code from another viewer, xCHM.

KchmViewer is available in most distribution repositories. You can also download it and install it (make sure you have the qt3-devel package) through the usual configure and make commands; check the specific instructions on the download page.

Under KDE, KchmViewer is associated with CHM files by default, so it runs automatically when you click on such a file. It can use either a Trolltech Qt widget or KDE's own KHTML widget to show the text (change widget from the Settings menu). I found one CHM file that wouldn't display correctly, and changing widgets solved the problem.

KchmViewer supports tabbed browsing, and it provides Contents, Index, and Search views. It correctly deals with foreign languages and multibyte character sets. You can generate bookmarks to mark your place in a document, and you can edit and delete bookmarks at will. You can view the original HTML code, and even specify which editor to use for this function via the Settings menu option.

Help Explorer Viewer

Help Explorer Viewer, developed by Kama Software, is free but not open source. It comes in both Windows and Linux versions, which is an advantage if you work with dual booting systems or in an environment with both operating systems. You can use Help Explorer Viewer to view not only CHM files, but HLP (older) and HXS (newer) help file formats as well. According to the Web site, you can integrate Help Explorer Viewer into your application through its API.

Installation is simple. Go to its Downloads page and get the Linux version, which currently stands at 3.0. Go to the directory where you downloaded the file, and enter these commands as root:/p>

tar zxf HelpExplorer3.0_LINUX.tar.gz cd Setup/ ./setup.sh

After you view the end-user license agreement (EULA), Help Explorer Viewer is installed in /usr/local/HelpExplorer. If you want to uninstall it, you can run the uninstall.sh script in that directory. The installation asked if I wanted to install KDE/GNOME menu items, but even though I answered yes, the program didn't appear in the main menu, in the Konqueror menus, or even in the context menu when I right-clicked on a CHM file; I don't know where it's supposed to appear, but I couldn't find it.

Help Explorer Viewer includes all the usual search mechanisms: table of contents (organized hierarchically, as a tree), index (a list of keywords), and common searching. The help files showed up correctly in all tests I ran, but I wish I could have changed the font the program used, because it displayed pixelated. You can change views between Contents, Index, Search, and Favorites (called Bookmarks in other viewers).

ChmSee

ChmSee is an open source Gtk2+ package for GNOME whose Web site is written mostly in Chinese; if it weren't for some parts in English, you'd be sorely tested to install or use ChmSee. It's free under the GPL, and version 1.0 was released in August.

Installing ChmSee could be a bother, but it appears in openSUSE standard repositories, which greatly simplifies things. If you want to build it from source, you'll need Gtk2+, libglade-2.0, gecko, chmlib, and OpenSSL. After getting the source package, you need to enter these commands:

tar xzf chmsee-1.0.0.tar.gz cd chmsee-1.0.0 ./configure make sudo make install

You might have to add a parameter to the configure command (--with-chmlib=/path/to/chmlib) if it cannot find chmlib. After installation, ChmSee was added to my openSUSE menus, but not my Konqueror or context menus.

You can configure the fonts used for display (something lacking in both KchmViewer and Help Explorer Viewer) by going to Edit -> Setup. Be careful with the Clear function, which deletes all ChmSee work files and causes the viewer to crash. If you opt for this, you'll have to reopen the CHM file. ChmSee doesn't offer Index or Search views; in fact, it has no search function at all. Also, in my testing, some CHM files displayed weird messages (and the text didn't get displayed), and some images didn't show at all.

ChmSee looks promising, but it still has a way to go before being at the same level as KchmViewer and Help Explorer Viewer.

Other candidates

Firefox users can download the CHM Reader add-on, currently at version 0.2.1.1. Installation is simple. The utility adds a new Open CHM Files entry to the Firefox File menu. When you open a CHM file, the table of contents is hidden by default, but you can bring it up by pressing Ctrl-E. Viewing files works fine, but CHM Reader doesn't offer a global search function, and the Firefox search function works only within the current page.

I tried to look at GnoCHM, xCHM, and KCHM (seemingly abandoned; its latest version is from 2003), but I got into dependency hell problems. I couldn't find distribution-ready packages, and installation from source was troublesome.

Conclusion

KchmViewer offers the easiest installation and greatest integration with the desktop environment. Help Explorer Viewer is useful for developers and users who work with both Linux and Windows. ChmSee has some bugs to be worked out, so I wouldn't recommend it for normal usage. CHM Reader is a good add-on, but its lack of searching power is a hindrance.

Federico Kereki is an Uruguayan systems engineer with more than 20 years' experience developing systems, doing consulting work, and teaching at universities.

Share    Print    Comments   

Comments

on CHM viewers for Linux

Note: Comments are owned by the poster. We are not responsible for their content.

Also FBReader

Posted by: Anonymous [ip: 65.216.75.111] on November 30, 2007 08:17 PM
supports lots of formats, including CHM.

#

Re: Also FBReader

Posted by: Anonymous [ip: 190.64.6.45] on December 01, 2007 03:37 AM
Yes, but it has some limitations, mostly with tables -- see http://www.fbreader.org/about.php under 'Main Features'.

#

Why no FBReader ?

Posted by: Federico Kereki on December 02, 2007 02:30 PM
I did find it when searching for appropriate Linux CHM viewers, but the note about its limitations (at http://www.fbreader.org/about.php) veered me away from it, since several of the CHM files I have do include tables.

#

Six CHM viewers for Linux

Posted by: Anonymous [ip: 87.194.100.144] on November 30, 2007 11:05 PM
A quick "yum search chm" in Fedora 8 found "arCHMage" and "fbreader" plus virtually all the others mentioned in the article ready for "yum install". Maybe he just isn't using the right distro? :-) Mind you, what you really need isn't pointless CHM viewers, but actually a CHM to other far more usable formats (e.g. HTML, XML, text etc.) converter. Then you can use your favourite text/HTML/XML viewer to view/search them rather than "yet another CHM viewer". arCHMage is probably about the closest to a CHM converter out of the lot.

#

Re: Six CHM viewers for Linux

Posted by: Anonymous [ip: 190.64.6.45] on December 01, 2007 03:33 AM
Converting the file first isn't as practical as viewing the CHM outright... I'd rather use a CHM viewer than mess around with conversions; easier, simpler, quicker!

#

Six CHM viewers for Linux

Posted by: Anonymous [ip: 86.121.134.185] on December 01, 2007 02:32 AM
Chm format has clear advantages over other formats.
Many operations like searching, indexing are easy to use offline, not depending on a server.
And a lot of books about open source software came in this fomat.

#

xCHM works fine on Ubuntu

Posted by: Anonymous [ip: 201.43.133.252] on December 01, 2007 04:25 AM
If you use Ubuntu, just apt-get it. It works smoothly.

#

GnoCHM works fine on Ubuntu also

Posted by: Anonymous [ip: 130.197.19.177] on December 01, 2007 05:26 AM
If you use Ubuntu, just sudo apt-get install gnochm. It works great.

#

Why no GnoCHM ?

Posted by: Federico Kereki on December 02, 2007 02:34 PM
I found no openSUSE version in its repositories, and when trying to build it from source, I couldn't find the packages it needed (see http://gnochm.sourceforge.net/#Requirements) -- apparently they run by other names, but in any case I wasn't able to get it up and running. I guess more people would be able to try GnoCHM if a SUSE version was available; I think most common users would never want to start chasing dependencies down, moreover when there are (at least equally good) alternatives around.

#

Re: Why no GnoCHM ?

Posted by: Anonymous [ip: 67.175.78.132] on December 04, 2007 03:38 AM
Not trying to knock Suse but, the package is available for RH, Fedora, and Centos. Perhaps you could use one of those rpms...

#

No, that's five CHM viewers for Linux

Posted by: Anonymous [ip: 82.192.250.149] on December 01, 2007 07:14 AM

If there are five good viewers that are truly free, why even mention one that keeps its source secret?


What's your problem with xchm? I use Debian, and xchm comes prepackaged from the standard Debian respository. Installing it takes a few mouse clicks. It seems to work perfectly.


IMHO, Linux.com needs better editing. An article like this one, that puffs a proprietary program when there are several perfectly good free (as in freedom) ones, shouldn't make it onto the web site. Especially when the author writes complete rubbish about 'dependency hell', long since solved by all widely-used distros for these packages. If he hasn't found distro-ready packages for xchm and gnochm, then either he is using some very obscure distro, or he just hasn't looked.

#

Re: No, that's five CHM viewers for Linux

Posted by: Anonymous [ip: 190.64.53.127] on December 01, 2007 02:19 PM
Last tiem I looked this was www.LINUX.com and not www.ONLY.FREE.OPEN.SOURCE.SOFTWARE.FOR.LINUX.com --- why should good prograsm be rejected just because they are not free? I want to know all about software for Linux --- would you exclude the (not freee) databases Oracle and DB2, for example, and just keep to Mysql or Postgres? I guess Linux users and administrators need to know al about every possible tool, even if they are not open source and free.

#

Re(1): No, that's five CHM viewers for Linux

Posted by: Anonymous [ip: 69.225.128.4] on December 01, 2007 05:37 PM
Please. The reviewer went to a lot of trouble to install ChmSee (that the website is in Chinese didn't even deter him or her!), and can't even be bothered to install gnochm and xchm, which will install easily on the top 10 mostly used linux distros? YOU'VE GOT TO BE KIDDING!!! And the editor (and/or author) gave a misleading title.

#

Re(2): No, that's five CHM viewers for Linux

Posted by: Anonymous [ip: 190.64.4.238] on December 01, 2007 09:22 PM
I'm guessing that the problem is that chmsee is in the OpenSuSE repositories while the other packages aren't... read the text, the author (a "him", from his first name) got everything from standard repositories. Why don't the xchm or gnochm people try and make their programs available for all important distributions?

That said, I'm perfectly happy using the standard kchmviewer, and I'm glad it turned out to be the top package.

#

Re: No, that's five CHM viewers for Linux

Posted by: Anonymous [ip: 59.161.0.235] on December 02, 2007 06:20 AM
May be he is using distro who join hand with m$!

#

Why a non-OSS viewer ?

Posted by: Federico Kereki on December 02, 2007 02:46 PM
First, as stated in http://www.linux.com/about/ Linux.com's goal is "to give you all of the resources and information you need to make your experience with Linux a success" and I don't see why using software that's not OSS (and might even be not free at all) is wrong.

Second, xCHM might be prepackaged for Debian, but is not available in the openSUSE (not a "very obscure distro", is it?) repositories I tried -- and installing it didn't just take "a few mouse clicks", but sent me off looking for other packages, eventually leading to my getting tired of it. If a common user has to run through many loops to install a program I guess he will give up quicker than I did.

I looked around for at least eight different viewers, and discarded those I couldn't install even after some work, and also those that had limitations (as not being able to show tables). I'm willing to go the extra mile if needed, but having found several fine appropriate packages, I didn't see a reason to keep going.

#

Six CHM viewers for Linux

Posted by: Anonymous [ip: 84.48.62.45] on December 01, 2007 01:10 PM
Another really good reader is the chm reader for firefox.

https://addons.mozilla.org/en-US/firefox/addon/3235

#

Re: Six CHM viewers for Linux

Posted by: Anonymous [ip: 190.64.53.127] on December 01, 2007 02:14 PM
Hey, the article DOES include that one! What I don't see is the "SIX" in the title... I count FOUR working ones, or SEVEN including the ones the author didn't get to install, but how come six?

#

Six CHM viewers for Linux

Posted by: Anonymous [ip: 59.161.34.254] on December 01, 2007 03:46 PM
You seems to have not tried xCHM yet. apt-get install xchm works very fine with Debian and Ubuntu. Other distribution packages are also available.

And, i'm xchm maintainer for Debian ;)

#

Re: Six CHM viewers for Linux

Posted by: Anonymous [ip: 190.64.4.238] on December 01, 2007 09:19 PM
Is there an Opensuse version? I'm running 10.2 and I could not find xchm in any repository. Or is there any Debian/Ubuntu repository I could use with Suse?

#

Why no xCHM ?

Posted by: Federico Kereki on December 02, 2007 02:28 PM
I didn't find xCHM in openSUSE's repositories, and at the xCHM downloads page (http://xchm.sourceforge.net/download.html) the newest xCHM SUSE version was for 9.2, while I'm running 10.3. I then tried building it from source, but it started requiring more packages, and I cut it short... sorry, but I guess if there were distribution ready packages for openSUSE, more people would be able to use it.

#

Six? no, 8

Posted by: Anonymous [ip: 86.92.145.244] on December 01, 2007 04:04 PM
And kde4's Okular also supports CHM, so that makes eight

#

Six CHM viewers for Linux

Posted by: Anonymous [ip: 213.140.21.234] on December 01, 2007 04:58 PM
I'd like to point http://code.google.com/p/chm2pdf/ if you need to convert chm files in pdf...

#

Why no Okular ?

Posted by: Federico Kereki on December 02, 2007 02:48 PM
I was aware of it, but since KDE4 hadn't been released yet (and now it seems it won't be until January) I didn't even try to get it running.

#

Uh, no

Posted by: Anonymous [ip: 84.48.47.233] on December 02, 2007 09:09 PM
I've used Linux exclusively for over 6 years and *never* had to touch CHM.

#

Spam deleted

Posted by: Anonymous [ip: 85.98.47.206] on December 03, 2007 07:57 PM
Spammer was here. Not any more.
[Modified by: Anonymous on December 03, 2007 09:24 PM]

#

xCHM

Posted by: Anonymous [ip: 89.181.104.123] on December 19, 2007 04:04 AM
I use xCHM. Comes with Ubuntu.

GnoCHM is there too.

...I guess you should use a distro with more packages. ;)

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya