Extract and decompile .chm file to view as html file under Linux
You can view .chm file using gnochm or kchmviewer under Linux. However sometime you cannot install these programs. There is a third alternative - arCHMage.
From the man page:
arCHMage is an extensible reader and decompiler for files in the CHM format. This is the format used by Microsoft HTML Help, and is also known as Compiled HTML. arCHMage is based on python-chm binding to chmlib from GnoCHM project.
It allows you extract .chm to directory.
Step # 1: Use apt-get command
If you are using Debian / Ubuntu, type the command:
# apt-get install archmage
Step # 2: Extract .chm to directory (directory will be created):
Type the command:
$ archmage file.chm output
Open your browser and type url file:///home/you/output or file:///home/you/output/index.html
Other usage
You can view chm file using inbuilt http-server.
View chm file using Webserver
You can run archmage as http-server, which will publish chm file contents on specified port:
# archmage -p 8888 /path/to/file.chm &
Open a browser and type ulr http://localhost:8888/ or http://server-ip:8888/
Force apache to publish chm files
You can force Apache to publish chm file contents if there is trailing slash in request to that file. First make sure you have working mod_python. Now open httpd.conf /apache2.conf file:
# vi httpd.conf
Add following lines to your httpd.conf:
AddHandler python-program .chm
PythonHandler archmod.mod_chm
Save and close the file. Restart apache.
# /etc/init.d/httpd restart
Now upload file.chm to document root of your Apache webserver. Now view file by typing URL: http://you.com/file.chm/
Note: trailing slash at the end of URL.
Download arCHMage
=> Download arCHMage
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Best Linux / UNIX Posts of 2007: Part ~ IV
- Configure and Install Ruby on Rails on Red Hat Enterprise Linux
- Download of the day: CakePHP - The rapid development php framework
- Search Linux / UNIX log files smartly for an alert or warning error
- Debian Linux: Allow non-root user to write CDs
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!



If possible try to use a CHM view rather than viewing it this way. In most viewers, you can search through the text - which is the main advantage of CHM files.