Installing Firefox 3.6 under Red Hat Enterprise Linux 5.x

29 March 2010

If you're actually trying to install another version of Firefox, then click on the Firefox tag, as there may be an entry on that other version.

Since a fair number of the hits to this 'blog are from searches as how to install Firefox 3.5 under RHEL 5.x or as to how to install Firefox 3.0 under RHEL 5.x, I'm going to infer that people are and will be surfing the WWWeb for instructions on how to install Firefox 3.6 under RHEL 5.x. Here are the steps that I recommend:

  1. Download the archive, firefox-3.6.n.tar.bz2.
  2. The tarball contains a directory, firefox, which should be dropped-in as a sub-directory of something. If you want to ponder where, then study the FHS. As for me, as root, I put it in /opt:
    tar -xjvf firefox-3.6.n.tar.bz2 -C /opt/
    (Replace that n with the actual number from the archive that you downloaded.)
  3. Make sure that you have compat-libstdc++-33 (a Gnome C++ compatibility library):
    rpm -qa | grep compat-libstdc++-33
    If not, then as root install it:
    yum install compat-libstdc++-33
  4. To avoid conflicts with SELinux, as root run
    chcon -t textrel_shlib_t /opt/firefox/libxul.so
    (If you didn't install the directory in /opt, or renamed the firefox directory, then you'll need to modify the above final argument to chcon accordingly.)
  5. You'll need a .desktop file for Firefox (though you may already have one). As root, edit/create /usr/share/applications/firefox.desktop, ensuring that it reads
    [Desktop Entry]
    Categories=Application;Network;X-Red-Hat-Base;
    Type=Application
    Encoding=UTF-8
    Name=Firefox
    Comment='WWW browser'
    Exec='/opt/firefox/firefox'
    Icon='/opt/firefox/icons/mozicon128.png'
    Terminal=false
    (Again, if you didn't install in /opt, or changed the name of the firefox directory, then you'll need to change the above accordingly.)
  6. Log out and back in or restart the system (to up-date the GUI).

Tags: , , , , ,

18 Responses to Installing Firefox 3.6 under Red Hat Enterprise Linux 5.x

  • Carlos says:

    Great, it works on my CentOS 5.4. Thanks a lot.

  • tom j says:

    I got the following error on the 'chcon':
    $ chcon -t textrel_shlib_t /opt/firefox/libxul.so
    chcon: can't apply partial context to unlabeled file /opt/firefox/libxul.so

    Despite that however Firefox 3.6.3 works on RedHat Enterprise 5.4.

    Thanks for the detailed instructions.

    • Daniel says:

      A few things could provoke that diagnostic, including having SELinux disabled. And, since you've subsequently been able to run Firefox, I'm going to infer that SELinux is disabled on your machine.

      (A lot of people have disabled SELinux because almost everything written about its fundamentals is nearly unintelligible unless one already understands those fundamentals.)

  • Gauraw says:

    Hi,

    I don't have root privileges. Is there a possibility I can still installed firefox 3.6.x on rhel5.

    Thanks,
    Gauraw

    • Daniel says:

      If compat-libstdc++-33 has been installed by root, then you should be able to install Firefox within your own account. You'll need to have or to creäte a directory in which to place it:

      mkdir ~/bin

      Extract the contents of the tarball thereto:

      tar -xjvf firefox-3.6.n.tar.bz2 -C ~/bin/

      You could creäte the .desktop file (step 5 above) as ~/Desktop/firefox.desktop, and thence drag it to the panel or whatever; firefox.desktop would need its seventh and eighth lines edited to point within ~/bin (or wherever you extracted the tarball) rather than within /opt.

  • adhe says:

    I tried those steps on CentOS 5.3 and no errors showed up. But when i restart the system and open firefox, it is still the 3.0.5 version. Is there any suggestion for me? Thanks.

    • Daniel says:

      Installing Firefox 3.6 wherever you put it (presumably in /opt) did not remove Firefox wherever else it may have been installed, and your method of invocation is launching version 3.0.5. The ways to change that depend upon how you invoke Firefox, and whether you want the other versions of Firefox to remain installed.

      If you're invoking Firefox through the Gnome GUI, then you are probably doing so by way of htmlview. For example, if you are using a launcher (analogous to an MS Windows shortcut), then its properties probably include the command htmlview %u. You should be able to have htmlview invoke Firefox by editing (perhaps creäting) a file ~/.htmlviewrc to contain a line

      X11BROWSER=/opt/firefox/firefox

      (assuming that your preferred version is in /opt). If you want to change this for all users, then edit /etc/htmlview.conf similarly.

      (I've seen other people instead hack htmlview (which is probably in /usr/bin), replacing its references to other versions of Firefox with a preferred version; but this means that every time that htmlview is replaced by an upgrade, it must be rehacked. Likewise, one could replace every reference to htmlview with a more direct reference to Firefox, but then one must find every relevant reference, &c.)

      If you're invoking Firefox from the command line, then you can adjust the PATH so that the shell looks at the preferred version before it sees any other version; the method for setting the PATH varies with the command shell used. But you only want one version of Firefox on your system, then /usr/bin/firefox could be aliased to /opt/firefox/firefox, without changing the PATH.

      Anyway, if my response so far doesn't help, then give me more information about just what you're doing to invoke Firefox.

  • raj says:

    [Desktop Entry]
    Categories=Application;Network;X-Red-Hat-Base;
    Type=Application
    Encoding=UTF-8
    Name=Firefox
    Comment='WWW browser'
    Exec='/opt/firefox/firefox'
    Icon='/opt/firefox/icons/mozicon128.png'
    Terminal=false

    the part Exec and Icon work properly when used without single quotes. I am using RHEL 5 ENT and only after removing the single quotes managed to display the "Icon"

    • Daniel says:

      They can work without the quotation marks if the specifications (as above) don't have something such as blank spaces.

      But I'm not sure why, in your case, they should fail with the single quotes unless either something (such as your browser) was substituting a different character (with similar glyph) for the single quotes, or something else were co-incidentally going amiss.

  • vyom says:

    Hi
    Sorry if i am quite late in typing the comment/doubt.
    I have followed the instructions which you gave at the top and has put in the same location too. The firefox runs properly and i could browse properly. I have installed in RHEL 5.4 64 bit and firefox installed is also 64 bit. The default firefox version in the OS is 64bit firefox 3.0.12
    I am finding a few issues ->
    1)Only a very a few of the plugins got loaded [the loaded plugins were installed by rpm files]. The plugins which did not loaded are java library, mplayer plugin.[ Mplayer plugin i manually kept in the /usr/lib64/mozilla for my previous firefox 3.0. Even java i kept the link over that location manually in that folder and it worked perfectly in firefox3.0]. I made a copy of those and kept in /root/.mozilla/plugins and still it didnt work in the new firefox 3.6.12
    2) The downloaded files has to be always pointed to teh application by which it get autoopened. For eg. if an mp3 song is downloaded i have to manually choose the application and then play. In the old firefox i didnot have this problem. I am facing this for all kinds of files for rpm types, etc. Old firefox 3.0 did not have this problem.

    Thank you for the response.

    • Daniel says:

      Have you tried simply reïnstalling mplayerpug-in and the JRE afresh, as opposed to using files left-over from the previous installation? (I'm not sure what you mean by java library here; I'm going to guess that you mean the JRE.)

      BTW, a plugin in /root/.mozilla will, as such, only be available when one is logged-in as the root user, rather than installing it for all users.

      Whether and which application takes responsibility for particular sorts of content may be set in

      Edit | Preferences | Applications

      Select an entry in Content Type, and then click on its Action to get a menu.

      • vyom says:

        Hello Daniel

        Thank you for replying...

        1)My first problem is defined here very well by an Ubuntu user
        http://support.mozilla.com/en-US/questions/679204 Only difference is that i am facing this in RHEL.

        At present I am running on root.
        I am sorry its jre plugin not java library. The link which you gave for jre is installed but still the same problem.After installation i kept the plugin in these folder /root/.mozilla and also at /opt/firefox/plugins. The firefox did not load the plugins from any of the places.

        The mplayer plugin link which you shared gives this message ""mplayerplug-in" will not be installed because it does not provide secure updates".
        But still for the above message i did a tweek in about:config I created New->Boolean value 'extensions.checkUpdateSecurity' and selected false as the value. Even though i created after it tried to install plugin it said it cannot install since its outdated and not supported in this version.
        The root folder of mplayer plugin http://sourceforge.net/projects/mplayerplug-in/files/Extension/ gave the next option only to install 3.55 which i did but still plugin did not load.

        2> I was thinking that the program association should i have to do it manually for all the programs [till now that i have never did in mac, windows]; firefox used to automatically give the association for each program. Is there any other by which i can automate it [by copying some files from the firefox version 3.0 which is preloaded with the OS].

        One more doubt -> Is there anyway that i can have both versions of firefox opened together?

        At present the plugin which got loaded where all installed by binaries. I had tweeked firefox to get the location of loaded plugins.
        Adobe -> /root/.mozilla/plugins/nppdf.so
        Flash -> /usr/lib64/flash-plugin/libflashplayer.so
        Default Plugin-> /opt/firefox/plugins/libnullplugin.so

        Plugin did not loaded were
        Mplyayer
        Jre
        Well i want to clarify that the above two plugins were manually kept in the plugins folder by a soft link which got loaded in previous version of firefox 3.0.12 [preloaded with OS]. My OS RHEL 5.4 64 bit.

        Thank you for your patience for reading and replying.

        • Daniel says:

          It seems that the most recent version of mplayerplug-in dates to mid-2008. Unless someone undertakes further development, the only way that you're going to be able to use that plugin is to use an earlier version of Firefox.

          While I don't know of a straight-forward way of running two different versions of Firefox simultaneously, you could have more than one version installed, shutting-down one to run the other. You could side-step the problem of having the different versions fret over plugin compatability by creating different accounts for different versions, installing the plugins in the respective ~/.mozilla/plugins/ directories.

          When you installed the JRE, if you installed the 64-bit version, a file libnpjp2.so should have been placed in the directory subtree in which the JRE were installed; leave it there. Remove any file/link libjavaplugin_oji.so in your Mozilla or Firefox plugins directories. Creäte a new symbolic link to that libnpjp2.so (not called libjavaplugin_oji.so) in /opt/firefox/plugins/.

          The file associations are set in files named mimeTypes.rdf. The default should be in /opt/firefox/defaults/profile/. I cannot promise that the format of this file has remained constant as Firefox has evolved, but so long as you back-up before over-writing, you should be able to experiment safely. (Should you try this, remember that you may be resetting the browser's Java configuration.)

          BTW, I would advise against using root as your ordinary account. If you need continual access to the powers of that account, then you could open a terminal, and within it use su to act as root.

          • vyom says:

            Hi Daniel

            I have tried removing libjavaplugin_oji.so but still it didnt work. I have placed libnpjp2.so only.
            The file association file called "mimeTypes.rdf" was not found in the new firefox directory, so i place the old one. Still it did not work. [i tried to put the mimeTypes.rdf from these locations /usr/lib64/firefox-3.0.12/defaults/profile/ and /root/.mozilla/firefox/dxoi9lec.default/ one after another both did not work]

            Any way this gives me the solution, opening two version of firefox simultaneously with a different profile
            http://www.howtogeek.com/howto/internet/firefox/use-multiple-firefox-profiles-at-the-same-time/

            Thank you very much :).

            • Daniel says:

              Well, I certainly thank you for proving that link!

              I wish that I could offer more help, but I'm (still) living in the 32-bit world, and unable to experiment with a 64-bit configuration.

  • Tamilselvan says:

    Hi Daniel..
    i Have installed firefox 3.6.12 in RHEL 5 .when i was open facebook and some web site that time my computer get automatically logout. i do not know how this happen so pls anybody notes help me..... i using acer laptop.

    • Daniel says:

      I'm not sure, but I think that you're writing of being logged out of your Linux session (rather than, say, logged off Facebook).

      In order to diagnose that sort of problem, one wants contents of one or more of the log files in /var/logs. (One might need to have root privileges to accesss these.) The file at which I would look first would be /var/log/messages.

      Okay, but, let's say that you can't make sense of the log files. The first thing to try might be to disable smooth scrolling, which can be a source of various sorts of grief. Go to

      Edit | Preferences | Advanced | General

      and, under Browsing make sure that Use smooth scrolling is not checked.

      If that doesn't work, then you might try completely reïnstalling Firefox — removing not only the program, but all the configuration files in your home directory.[1]

      I cannot guarantee that any of these things (including a careful examination of the log file) would resolve your problem. For example, the problem could entail a bug in the driver for a video card that is no longer actively supported.


      [1] First, save copies of bookmarks.html, key3.db, and signons.sqlite found in your profile folder. You can copy these the new profile folder after the fresh installation.

      You can identify your profile folder by going to

      Help | Troubleshooting Information…

      and, under Application Basics, beside the label Profile Directory, click on the button labelled Open Containing Folder. The name of your profile directory will appear at the top of the window that is opened.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.