debian etch + gtk+ 2.12 + firefox 3

June 10, 2008

#20080610#20080626#20080827

#Please note: It’s many months now that I wrote these steps. Libraries may have changed and I did not update the links. So you have two choices :

- directly follow the links I wrote: in this case these instructions will help you but you will have slightly old libraries.

- search for new versions of the libraries: if something has changed these instructions will not be able to cover the new subject.

anyways, choose as you like ;)

Another note: Lenny is about to be released …  I suppose we will have iceweasel version 3 by default .

#Please note : this _is_ and _will remain_ work in progress. Before executing the steps think of what I wrote : I am in a hurry and the informations lack of completeness here and there. Any suggestions/corrections are welcome. At present it seemed they worked fine for many people.

#Please note: Every change to the environment variables described here vanishes if you do not store it somewhere (i.e. bashrc or something).

#Please note : some steps need root privileges. I installed all the libs as a non-root user . if you want to do it differently modify the steps according to your taste.

#Please note: I just found a writing about the use of LD_LIBRARY_PATH. And it is a bit “scary”… See http://www.eyrie.org/~eagle/notes/rpath.html . Setting the value of LD_LIBRARY_PATH influences all our next compilations and execution of programs that use the libraries we are going to install- it’s useful to remember this. So do we need to change something in the following lines ? Do we need to compile FireFox from source and link everything statically ?? :-D Suggestions greatly appreciated. UPDATE: Okay, thank to that page, I found the solution, that is explained in the 2nd section.

1st Section - Build the libraries gtk+ 2.12 and install them as a non-root user.

  1. Install through aptitude/synaptic some of the packages gtk+2.12 depends upon. Here is the list of what I had to install (do you think that we can slim down this list ?) :
    • The package xorg-dev. All its dependencies are handled automatically.
    • The package libtiff4-dev. All its dependencies are handled automatically.
    • The package libpng12-dev. All its dependencies are handled automatically.
    • The package libpango1.0-dev. All its dependencies are handled automatically.
    • The package libatk1.0-dev. All its dependencies are handled automatically.
    • The package libgtk2.0-dev. All its dependencies are handled automatically.
    • The package gettext. All its dependencies are handled automatically.
    • The package libxul-dev. All its dependencies are handled automatically. (NEW)
  2. Choose a folder/subfolder in the home directory where all the libraries,binaries man pages will be installed. I will call it <folderofchoice> from now on.
  3. Fetch and install the package glib 2.16. I did this step as a non root user, with its drawbacks. But I like it and it s convenient to my system.
    • Open a console.
    • Unzip and untar the package somewhere in the home folder.
    • Change the current working directory to the main glib package directory.
    • Execute the script configure located in the glib 2.16 main folder. I had to pass configure the following parameter –prefix=$HOME/<folderofchoice> so that glib could be completely rooted to <folderofchoice>. The command was the following : ./configure –prefix=$HOME/<folderofchoice>.
    • Execute the command make install. After that you should have glib 2.16 built and rooted at $HOME/<folderofchoice>. To test this you can ls the contents of $HOME/<folderofchoice>.
  4. Fetch and install the package pango 1.20. I did this step as a non root user, with its drawbacks. But I like it and it s convenient to my system. Please note that pango 1.20 requires glib 2.14 or newer. Glib 2.12.4 is installed system-wide so We must tell pango to use the glib 2.16 we installed in the previous step. Look :
    • Open a console.
    • Unzip and untar the package pango 1.20 somewhere in the home folder.
    • Change the current working directory to the main pango package directory.
    • Modify the environment variable PKG_CONFIG_PATH so that its content is the path to glib 2.16’s pkgconfig directory. Oh, well here we go if you are using BASH :
      export PKG_CONFIG_PATH=$HOME/<folderofchoice>/lib/pkgconfig.
    • Modify the environment variable LD_RUN_PATH so that its content is the path to the newly installed libraries. If you are using BASH here is the command
      export LD_RUN_PATH=$HOME/<folderofchoice>/lib .
    • Execute the script configure located in the pango 1.20 main folder. I had to pass configure the following parameter –prefix=$HOME/<folderofchoice> so that pango could be completely rooted to <folderofchoice>. The command was the following : ./configure –prefix=$HOME/<folderofchoice>.
    • Execute the command make install. After that you should have pango 1.20 built and rooted at $HOME/<folderofchoice>. To test this you can ls the contents of $HOME/<folderofchoice>.
  5. Fetch and install the package gtk+2.12 . I did this step as a non root user, with its drawbacks. But I like it and it s convenient to my system. Please note that gtk+2.12 requires glib 2.14 or newer. Glib 2.12.4 is installed system-wide so We must tell gtk+2.12 to use the glib 2.16 and pango 1.20 we installed in the previous steps.
    • Open a console.
    • Unzip and untar the package gtk+2.12 somewhere in the home folder.
    • Change the current working directory to the main gtk+ package directory.
    • Modify the environment variable PKG_CONFIG_PATH so that its content is the path to glib 2.16’s pkgconfig directory. Oh, well here we go if you are using BASH :
      export PKG_CONFIG_PATH=$HOME/<folderofchoice>/lib/pkgconfig.
    • Modify the environment variable LD_RUN_PATH so that its content is the path to the newly installed libraries. If you are using BASH here is the command
      export LD_RUN_PATH=$HOME/<folderofchoice>/lib .
    • Execute the script configure located in the gtk+2.12 main folder. I had to pass configure the following parameter –prefix=$HOME/<folderofchoice> so that gtk+ could be completely rooted to <folderofchoice>. The command was the following :
      ./configure –prefix=$HOME/<folderofchoice>.
    • At this point you should have configured the gtk package. One problem arises. In my system if I next give the command ‘make’ the build process stops complaining libtool has an invalid argument. A temporary workaround is the following.
      • Open with a text editor the Makefile located in the gtk+2.12 main folder.
      • Search for the word ‘tests’ and delete it. The result is that the gtk tests will not be built but the package will be built correctly. I hope I can find the correct fix, anyways.
    • Execute the command make install. After that you should have gtk+2.12 built and rooted at $HOME/<folderofchoice>. To test this you can list the contents of $HOME/<folderofchoice>.

    That’s it ! You should have everything set up to run Firefox 3. Let’s try it !

2nd Section - Fetch and install Firefox 3.

  1. Fetch the Firefox 3 binary package that you like the most ;) and execute it making sure that the environment variable LD_LIBRARY_PATH stores the path to the newly installed libraries.
    • Open a console.
    • Unzip and untar the package firefoxXXX somewhere in the home folder.
    • Change the current working directory to the main firefoxXXX package directory.
    • Now, you can fallow one of two ways :
      Way one
      #Please Note: this way the scope of LD_LIBRARY_PATH is the whole shell environment.

      • Modify the environment variable LD_LIBRARY_PATH so that its content is the path to the newly installed libraries. If you are using BASH here is the command
        export LD_LIBRARY_PATH=$HOME/<folderofchoice>/lib .
      • Run the local copy of Firefox 3. Here is the command : ./firefox. It is important that you tell the shell to run the local copy of firefox otherwise the “system wide” firefox will be executed.

      Way two (I think “safer”)
      #Please Note: this way the scope of LD_LIBRARY_PATH should be only the program we are executing, not system wide scope.

      • Create a wrapper script that has the following 3 lines (sorry, I had to cut the “export” in 2 lines). NOte: this is a very basic script. I mean I am just passing one parameter to the “real” firefox (i.e. an URL). To allow more complex situations you have to modify it.
        #!/bin/sh
        export LD_LIBRARY_PATH
        =$LD_LIBRARY_PATH:$HOME/<folderofchoice>/lib
        <full_path_firefox_folder>/firefox $1
      • Save the script with a non-conflicting-name that you like in the main firefoxXXX package folder (the current folder, if you followed the steps). Let’s suppose to call the script startfox.
      • Change the permission of the script so that it can be executed :
        chmod u+x ./startfox
      • Run the script startfox.
    • is it running ?

Here are some notes about the customization of the gtk theme

Linked articles (thanks to the senders) :

cheers !

d

Entry Filed under: mydebian. Tags: , , .

26 Comments Add your own

  • 1. hakierkmiec  |  June 17, 2008 at 8:43 am

    Thanks, it works!! But what with that ugly look of icons and toolbars? I have grey address bar after unfold, and strange looking toolbar icons. How can I fix that?

    Cheers.

  • 2. d7p8  |  June 17, 2008 at 3:00 pm

    HI !

    Thank you very much for your feedback and also to take time to follow the post. This post needs many improvements, that I hope to add in the future.

    Anyways, the look of firefox 3 here does not seem so ugly…Unfortunately I dont have means to understand what the problem could be. I am thinking that maybe the theme you are currently using does not “support” Firefox 3 — well, if you are using a theme that is not the standard one. If I am not wrong by default Firefox 3 will use the default theme you are using in Firefox 2 — if you were using Firefox 2.

    To start firefox 3 with a complete new profile you should launch it with the option –ProfileManager and follow the “instructions” on screen… i.e. firefox –ProfileManager .

    Tell me if you find the solution ;)

    d

  • 3. Amit  |  June 17, 2008 at 5:45 pm

    I did the same thing but in a different way…anyways for the “theme” looking ugly…you have to download the latest gtk-engines and change your theme to “Clearlooks”

  • 4. jakub  |  June 17, 2008 at 8:18 pm

    I writing this words with ff3 and debian etch. Thank you.

  • 5. Furao  |  June 18, 2008 at 2:36 am

    Thank’s.. it works =D

  • 6. Furao  |  June 18, 2008 at 2:40 am

    Any problem if I translate this tutorial in to portuguese, right?

  • 7. d7p8  |  June 18, 2008 at 7:18 am

    eheh, Thank you to everyone for sharing the successful stories ! I am happy I could be of help, really.

    —About the translations of this page —
    Of course you can translate it - if you think it’s worth it ;). Make sure to post in the translation a link to this page - in case I add new lines to it people can reach them too. And, also, send me the link to the translation. I will list it also here.

    thank you very much, Sincerely

    d

  • 8. hakierkmiec  |  June 18, 2008 at 6:45 pm

    I’m still cant change look of my firefox 3. Take a look at those selects in form.
    http://img147.imageshack.us/my.php?image=clipboard02tq3.png

    Any help?

  • 9. d7p8  |  June 18, 2008 at 7:54 pm

    here ffox looks the same. Anyways, I tried to install a new theme and it works fine too.
    The themes page offered by Mozilla is the following:
    https://addons.mozilla.org/en-US/firefox/browse/type:2/cat:all?sort=name

    There you can find many themes and add ons, but pay attention that the theme is suitable for ffox3.

    d

  • 10. Sameer Mohamed Thahir  |  June 19, 2008 at 3:39 pm

    You can install the gtk-engines from http://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.15/gtk-engines-2.15.1.tar.bz2

    The installation should be done in the same way as for the other packages(pango,gtk ) and you will have firefox looking the way you wanted to .
    njoy!!!

  • 11. ap  |  June 20, 2008 at 2:00 am

    Thanks. It was extremely helpfull !!!

    ap

  • 12. hakierkmiec  |  June 20, 2008 at 9:03 am

    Thanks guys, now I know how to change look.
    In brief.
    For theme Industrial for example you must copy
    /usr/share/themes/Industrial/gtk-2.0/gtkrc
    …to
    $HOME//etc/gtk-2.0/gtkrc

  • 13. debian etch + gtk-engines&hellip  |  June 20, 2008 at 11:12 am

    [...] note: These notes are my starting [...]

  • 14. hakierkmiec  |  June 20, 2008 at 8:01 pm

    Of course copy to
    $HOME/<folderofchoice>etc/gtk-2.0/gtkrc

  • 15. seriouslycgi  |  June 21, 2008 at 1:01 am

    too much work to get a browser to run!

    ff2 is fine for now.

  • 16. Kurian Thayil  |  June 23, 2008 at 8:05 pm

    Hi,

    Thanks for the info and it works. I folowed the way one of the 2nd section. I have one issue though, how will I include flash player with firefox 3? Do suggest and advice.

    Kurian.

  • 17. d7p8  |  June 24, 2008 at 10:44 am

    Hi Kurian,

    thanks for the message. I can think of a pretty easy way to do this, but I dont know if this can conflict with any flash player plugin that is system-wide installed (if it is).Adjust these infos and eventually the links according to your system.

    As I did not have any flash player plugin, I did the following :

    - Downloaded the latest version of the .tar.gz flash player for Linux.
    - Closed Firefox 3
    - In the folder “.mozilla”, located in my HOME directory, I created the folder named “plugins” (without the “” ).
    - I extracted in a temporary folder, let’s say /tmp, the contents of the package just downloaded.
    - I copied the file “libflashplayer.so” in ~/.mozilla/plugins
    - Started Fireofox 3 and tested the flash player loading http://www.adobe.com

    the flash player should be running …

    :-)

    d

  • 18. Kurian Thayil  |  June 24, 2008 at 6:37 pm

    Hi,

    That was easy. I already had libflashplayer.so file installed in .mozilla folder in my home directory. I had firefox 2.0.x before. But eventhough it had this library firefox 3 was not supporting flash. So I extracted this library and copied in /firefox3/plugins . I restarted firefox 3 and it supported.

    Kurian.

  • 19. Flyzone  |  June 25, 2008 at 8:13 pm

    Big problem… :-(
    Seems it doesn’t read anymore my window manager settings… :-(
    I explain….. I’m using KDE and I have set it to use the default theme also in GTK applications. In firefox2 was ok, using firefox 3 with these library, I get the default gnome theme, the keys-shortcuts works different (not like in KDE) and the mailto association point to thunderbird instead of kmail also if I have set the network.protocol-handler.app.mailto to kmail.
    UFFFFFFFFFFFF…what is the problem? I have done all exactly in the tutorial, of many tutorials, always the same result! :-(

  • 20. d7  |  June 25, 2008 at 10:45 pm

    eheh, this is not a big problem - also in general - actually.

    if you type “mailto:” in ffox3 address bar you can choose what application to run for writing emails. _here_ ffox3 asks me what to do. Alternatively you can look at ffox3 menu : Edit - Preferences - Applications -> mailto

    Also you can have your kde theme for ffox 3. This can be done as I just did it. But I do not think it is good to add more new stuff … we can end up having a “completely” new debian-like-distro in the home folder.

    Well, If you like I can write down what I did but in few hours !

    d

  • 21. Flyzone  |  June 26, 2008 at 8:32 am

    d7, thanks for your reply
    In the preferences is set to use kmail ! :-/
    Ah another “bug”…when I click on kmail on a url, Firefox open without pass the link, it open with the default page, with firefox2 neither this problem appear.
    About the theme…for me was already too much to load another gtk+ library in my etch :-P but…now I would like to know how to solve this problem, I don’t like to leave some…hole in my knowledge :-)

  • 22. d7  |  June 26, 2008 at 9:22 pm

    :-) thank you for the feedback.

    Okay that is not a bug of Firefox 3. The fact that firefox does not open the url is because it does not get the URL from the wrapper script. I did not take into account different situations writing that script but just a basic case. Look at that script now : there is a $1 that means the “real” firefox will get the address so you will see everything working fine. For more complex situations is good to write a more detailed script.
    Give me some more time and I ll write about kde + firefox. I should check something before.

    d

  • 23. bkil  |  June 28, 2008 at 8:37 pm

    You ought to replace the aforementioned $1 with “$@”. It may or may not solve the given problem.
    Cheers!

  • 24. bkil  |  June 28, 2008 at 8:41 pm

    Sorry about the last one, the given substitute originally read “double-quotes, dollar-sign, at-sign, double-quotes”. "$@"
    Keep up the good work! :)
    k

  • 25. nguprex  |  July 3, 2008 at 12:30 pm

    Thanks, very help fully :D

  • 26. Cómo instalar firefox 3 &hellip  |  July 6, 2008 at 9:34 am

    [...] Cómo instalar Firefox 3.0 en Debian Etch. Tutorial en inglés que explica también como instalar las librerías de las que depende Firefox. Incluso advierte de previsibles errores. [...]

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

June 2008
M T W T F S S
« May    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Most Recent Posts