Setting up GnoCHM reader on FC4

From FedoraNEWS.ORG

Written by Anze Vidmar on 2005-08-18

Table of contents

What is GnoCHM?

GnoCHM (http://gnochm.sourceforge.net/) is a CHM file viewer. It is designed to integrate nicely with Gnome.

CHM is the file extension for Microsoft compressed HTML help files and ChemDraw Chemical Structure files.

Many online books and manuals come in *.chm format.


Why GnoCHM and not xchm?

  • Simple, it has:
    • Support for external ms-its links
    • Full text search support
    • Bookmarks
    • Configurable support for HTTP links
    • Integrated with Gnome2
    • Support for multiple languages (pt_BR, it, de, ru, tr, zh_CN)
    • Support to open multiple files at once
    • Displays HTML page source


Let's get busy!

First, we need to install some required packages for GnoCMH to actually work. 
In my case, I've used yum (http://dag.wieers.com/home-made/apt/FAQ.php#B4) with additional repositories dries, dag, and freshrpms. More info on repositorys can be found here (http://stanton-finley.net/fedora_core_4_installation_notes.html#Yum). Note that you need root permissions to be able to complete this following tasks.

Login into the shell and execute:

yum install -y pygtk2 gnome-python2 gnome-python2-gtkhtml2 gnome-python2-gconf gnome-python2-bonobo


Some of the packages in order for GnoCHM to work are not in additional repositories, therefore we need to get them and install them manualy. First, we are going to download chmlib.

Go to http://66.93.236.84/~jedwin/projects/chmlib/ and download chmlib-0.35.tgz (the version is IN the time of writing this manual).

Next, let's unzip and install the CHM library. 
Goto your /usr/local folder and unzip chmlib:
tar xvfz /path/to/downloaded/chmlib-0.35.tgz


Next, compile and install this fine peace of library:

./configure && make && make install


At this point, we have chm library set up.


Now, we need to get pychm installed. 
PyCHM is a package that provides bindings for Jed Wing's CHMLIB library.

Fire up your favorite web browser and goto http://prdownloads.sourceforge.net/gnochm/pychm-0.8.2.tar.gz?download. Download pychm-0.8.2.tar.gz. After you save the file, login into your shell and extract the tarball:

cd /usr/local ; tar xvfz /path/to/downloaded/pychm-0.8.2.tar.gz


Install it:


cd pychm-0.8.2 ; python setup.py install


Default install path for this bindings are in /usr/local/lib. 
GnoCHM is picky about paths, so we need to set up a soft link to the library libchm.so.0. This is done by issuing the following command:
ln -s /usr/local/lib/libchm.so.0.0.0 /usr/lib/libchm.so.0


The final step is to compile and install gnochm. 
Goto http://prdownloads.sourceforge.net/gnochm/gnochm-0.9.5.tar.gz?download and download gnochm-0.9.5.tar.gz.

...than extract:

cd /usr/local ; tar xvfz /path/to/downloaded/gnochm-0.9.5.tar.gz


...compile and install

cd /usr/local/gnochm-0.9.5 ; ./configure && make && make check && make install


Final words

At this point GnoCHM is installed. In order to avoid some kinky error at gnochm startup complaining something about "color_parse() argument", make sure you logout/restart your box first.

After that, GnoCHM is ready to show you some books that you like by issuing the command

gnochm


That's it. Enjoy.

Personal tools