How to: Open CHM Files in Ubuntu and Convert to More Stable Formats
In Ubuntu, you can easily open pdf files, but if you try opening a chm file, an error often creeps up, saying “There is no application installed for this file type“. This is because, Ubuntu comes with no integrated support for chm files.
What is .chm file format?
It is basically a microsoft proprietary file format that is basically designed for the help files deployment. It is considered as a handy file format as in this various HTML files can be collected together in one whole compact package and hence used in formation of various ebooks.
How to open CHM file in Ubuntu or any linux version?
Various Linux users find difficulty in opening the .chm file. But with the following steps, it is very easy to open them :
- Open the terminal . Applications-> Accesories->Terminal
- Install the following software by typing in the terminal
And now you can open any .chm file with the help of XCHM viewer utility.
Now as .chm reader is basically meant for Microsoft help files platform so many of you would be wondering that these Windows help files are irrelevant to UBUNTU. This is helpful in ebooks and online documentation, but as it was less secure and its interface is also a nerd like, so we can also convert it into many other stable formats. The later section is related to this kind of conversion.
How to convert .chm files to .pdf ?
.chm files does not provide facility for editing and then republishing. Hence, to perform this we need to convert them into .pdf or other more stable format.
Step 1 : Install package libchm-bin.
Generally package libchm-bin is preinstalled in the Ubuntu jaunty and its later version. But you can also install it with the following command in TERMINAL .
Here’s a ScreenShot of the terminal.-
Step 2: Extract all html files.
Secondly we need to extract all the html files with the help of the extract_chmLib, an CHMLIB included application. To do so type the following command in the TERMINAL:
Example.- As in my case the file is at desktop so file.chm is required file and htmldir is folder that will be automatically generated so at to store all those .html files that are in compact form in .chm file.
where file name is Effective C++ & More Effective C++.chm and the output file directory is htmldir
Here’s a ScreenShot of the terminal.-
Step 3: Install HTMLDOC.
After extracting the .html files , you need install another utility called “HTMLDOC” so at to convert the all these html pages as full fledged .pdf book.
Type the following command to do so ..
After installing the package which is of approx. 10.1 Mb you can open it by simply hitting the following command in your terminal
Here’s a ScreenShot of the interface.-
Add the html files you want to wrap up in the serail order in INPUT tab and don’t forget to check the “web page” as the Document type. Secondly you need to make your output properties which is as follows :
Here’s a ScreenShot of the interface.-
Now it will take a little time to get your files in repacking and later on to convert them as your pdf book .
Other utilities for opening .chm files?
There are other many other popular utilities available which are as follows :
- gnochm – much more like that of xchm
- kchmviewer – for Kbuntu and KDE platforms.
After using all these utilities i’ll put my vote over back to “xchm” . The reason being for such support is primarily stable .
It is easier to use than that of “gnochm“. Moreover in page search is much better in “xchm”. Secondly for KDE platform users, they can simply open the .chm files in the “konqueror ” browser, no need for kchmviewer.
Choice is all Yours.
Enjoy your ebook. So we have overcome Windows Help files too ..
LINUX= Windows + FUN + FREEDOM ..
GO FREEEEE..
Not many people are aware of the ease with which one can perform such operations.
Comments are Welcome. And, please Share it if you Like it.
It may feel strange since many .chm to pdf convertors are avaiable. But, we will share the Software technique for the same, in our upcoming post!
Thanks.




















