Monday, November 17, 2008


Ugrading GTK - Firefox 3 on SuSE 10.1

I finally switched to Firefox 3 on my work PC. It runs opensuse 10.1, which runs an old version of GTK unsupported by Firefox. I did not want to upgrade SuSE just for Firefox, so decided to upgrade just gtk+. The problem is, gtk depends on thousand other packages. And the worst part is no one has documented how to upgrade them, what environment variables to set, and which packages to download. Here is what I did to install all of them, and it was not that bad.

I installed the following packages (in same order):

  • glib-2.18.2.tar.bz2
  • pixman-0.12.0.tar.gz
  • cairo-1.8.4.tar.gz
  • pango-1.20.5.tar.bz2
  • atk-1.24.0.tar.gz
  • gtk+-2.14.2.tar.bz2

I decided to install everything under /opt/gtknew/ in order to keep my already working copy of gtk intact. Below are the environment variables I had to set before compiling all the packages above. For installation, I used ./configure --prefix=/opt/gtknew/; make; make install for all of the packages.

export PKG_CONFIG_PATH=/opt/gtknew/lib/pkgconfig/:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/gtknew/lib/:$LD_LIBRARY_PATH
export PATH=/opt/gtknew/bin/:$PATH

Once all gtk libraries were installed, all I had to do was to download firefox 3 and set the correct LD_LIBRARY_PATH.

tar jxvf firefox-3.0.4.tar.bz2
cd firefox
export LD_LIBRARY_PATH=/opt/gtknew/lib/:$LD_LIBRARY_PATH

I finally edited the firefox executable script, and added the export command for LD_LIBRARY_PATH on the top of that file. Now Firefox uses the new GTK, while rest of the desktop is using the good old version of gtk.

rofl, you poor SuSE users.

Here on Gentoo, I just do 'emerge firefox' :)
Interesting, but can't get it working. I followed your instructions but the install of cairo fails.

Looks like it complains not having pixman-1 >= 0.12.0, but this one is already in /opt/gtknew/lib

The cairo install gives:
checking whether cairo's image surface backend feature could be enabled... no (requires pixman-1 >= 0.12.0
configure: error: mandatory image surface backend feature could not be enabled
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.

Any idea? Thanks
Remi, did you execute the "export PKG_CONFIG_PATH" line ? I had the same problem at first, because pkg-config was not showing that I had installed pixman.
This comment has been removed by a blog administrator.
This comment has been removed by a blog administrator.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?