How to read or view chm file in Linux

chm is Compiled HTML Help which is not a strange file format nowadays. If you are using Slackware Linux, you can open chm file using Konqueror in KDE. You can open Konqueror by clicking kde Start, choose Internet and click Konqueror - Web Browser. You can navigate to the chm file from here or use Location menu, and Open location to browse for the chm file. See example on how to open chm using Konqueror screenshots below:

Konqueror browser screenshot. You can navigate to the chm file using Konqueror main menu here:

Konqueror main menu screenshot image

Konqueror Location menu screenshot. You can open chm file using 'Location menu - Open location' and browse for the file:

Konqueror Location menu screenshot image

You can also open chm file by right-click the chm file's icon, and choose Open with. From the list, choose 'Internet', and then 'Konqueror':

Choose Konqueror screenshot image

There is a better application that can do more than open chm file in Linux called xchm. xchm is a GPL licensed software developed for UNIX system including Linux and *BSD. The official xchm website is xchm where you can find more information about xchm and download the package for your Linux distribution.

Build xchm package for Slackware Linux

If you want to build Slackware xchm package yourself, it's easier by getting the slackbuilds script from website and get the latest source from xchm official website mention above. See the prerequisites for building the xchm package for Slackware below:

xchm prerequisites

When you already installed chmlib and wmGTK, you can begin building Slackware xchm package. Change directory to your work area directory or anywhere that you prefer:

[email protected]:~# cd /home/slackware/source/myslackware/

Extract slackbuilds script file, the xchm.tar.gz. See example below:

[email protected]:/home/slackware/source/myslackware# tar zxvf /home/luzar/work-area/xchm.tar.gz

Change directory to the xchm directory. Copy xchm source into the extracted slackbuild's script file. See the example command below:

[email protected]:/home/slackware/source/myslackware# cd xchm/
[email protected]:/home/slackware/source/myslackware/xchm# cp /home/luzar/work-area/xchm-1.14.tar.gz .

Everything is in place now. Run xchm.SlackBuild script to make xchm a standard Slackware package.

[email protected]:/home/slackware/source/myslackware/xchm# ./xchm.SlackBuild

You can find the result package in /tmp directory. To install the new Slackware xchm package, run installpkg xchm-1.14-i486-1_SBo.tgz. See the example below:

[email protected]:/home/slackware/source/myslackware/xchm# cd /tmp/
[email protected]:/tmp# installpkg xchm-1.14-i486-1_SBo.tgz
Installing package xchm-1.14-i486-1_SBo...
xchm: xchm (viewer for .chm files)
xchm: xchm is a viewer for Compiled HTML Help (.chm) files.

Install xchm in Ubuntu

You can use apt-get command to install xchm package from command prompt or using Add/Remove from x-window. To open Add/Remove program, click Applications and choose Add/Remove.... In the Add/Remove program pane, type 'xchm' in the Search text box. You'll see the result similar to the example screenshot below:

Add/Remove program with xchm screenshot image

Tick on the application tick box and click Apply Changes button to install xchm program. Close Add/Remove pane after the installation is finish.

Here is the step by step guides on how to install xchm from Ubuntu command prompt.

1) Check whether xchm is installed in the system:

[email protected]:~$ xchm
The program 'xchm' is currently not installed. You can install it by typing:
sudo apt-get install xchm
bash: xchm: command not found

2) Install xchm using sudo apt-get install xchm command:

[email protected]:~$ sudo apt-get install xchm
[sudo] password for kucing:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libchm1 libwxbase2.6-0 libwxgtk2.6-0
The following NEW packages will be installed:
libchm1 libwxbase2.6-0 libwxgtk2.6-0 xchm
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 3483kB of archives.
After this operation, 10.1MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Run xchm again:

[email protected]:~$ xchm

This time the xchm pane pop up. Here is the xchm example screenshot:

xchm screenshot image

Click Open menu in the xchm toolbar and manually browse the xchm file that you want to open. You can can also view .chm file by right-click on the file's icon and choose Open with other application and choose 'xCHM'. See the example screenshot below:

Choose to open file with xchm screenshot image

That's all. Here is the result of the Slackware package example above if you don't have time to build one for yourself. However, and the writer do not responsible for any harm done to your system. By using this package, you are agreed to the Web Site Agreement. Use it at your own risk.

Download Slackware 12.2 xchm-1.14-i486-1_SBo.tgz package.

Add new comment