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
./firefox

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.


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