Saturday, December 20, 2008

Reading Comics (cbr) files with OpenSUSE and Ubuntu

I downloaded Cory Doctorow's Futuristic Tales of the Here and Now comic and was faced with the problem of trying to read cbr files (comic book file, essentially rar'ed file of JPEGs and stuff) on my OpenSUSE notebook.

Unfortunately OpenSUSE does not seem to have Comix in its OSS, NON-OSS and Packman repos.

Oh well, no biggie, I'll head over to Comix's web site and download the tar ball.

From its web site, Comix is a user-friendly, customizable image viewer. It is specifically designed to handle comic books, but also serves as a generic viewer. It reads images in ZIP, RAR or tar archives (also gzip or bzip2 compressed) as well as plain image files. It is written in Python and uses GTK+ through the PyGTK bindings.

It needs Python 2.4 and above, PyGTK (python-gtk for OpenSUSE) and Python Imaging Library (python-imaging for OpenSUSE), and then it's just a matter of #python install.py install.

For Ubuntu, all it took was the simple $sudo apt-get install comix

5 comments:

bc said...

I've found the Opera browser a very usable alternative to a comic book reader -- I can't remember if it can browse a rar/cbr etc file directly (probably not) but if the files are unpacked into a directory, Opera is wonderful for reading comics. The main advantage is the beautiful zoom control.

Unfortunately, Opera won't display images side by side, of course, or have the other dedicated controls. But I've never been thrilled with most of the dedicated comic book readers I've seen, so it's nice to have Opera around...

Just a thought.

msian_tux_lover said...

Hi bc,

Thank you for the comment and suggestion. I never used Opera for anything more than web surfing and an occasional IRC, now I know.

LeroyLim said...

Hey there, I have a alternative method. Since I think using package management system in OpenSUSE is neater/easier to manage. (Etc easier removal and installation)

Make sure you have python-gtk and python-imaging (development packages too)

Heres how.

1) Go to here and download the latest .src.rpm. Last I saw the latest version was comix-3.6.4-1

wget http://dag.wieers.com/rpm/packages/comix/comix-3.6.4-1.rf.src.rpm

2) Install the necessary packages, etc
There may be more dependencies needed besides these.
Go to terminal / konsole, and enter the below command to install the needed packages. Remember to su or sudo.

su
zypper install rar python-imaging python-gtk python-gtk-devel

3) Change directory to where the src.rpm is and run the following command to build a .rpm from the .src.rpm.

We are going to use the --nodeps flag because in OpenSUSE, the pygtk2 package is named python-gtk

rpmbuild --rebuild --nodeps comix*.rpm

4) Now it's done, change directory to the packages folder. It should be in /usr/src/packages/RPMS/noarch

cd /usr/src/packages/RPMS/noarch

5) Install the rpm package using the rpm command.

rpm -Uvih comix*.rpm

LeroyLim said...

Heh, talking about that. Theres a even newer version of it on OpenSUSE build

Go here and search for comix then just click One-click install to download a .ymp file and open it with the default handler (Yast)

Ian Monroe said...

Okular works just peachy as well.