Manually Installing The Latest Firefox in Kubuntu : A Cleaner Installation

By | 2007/10/09

So I’ve decided that Konqueror is just not the web browser that some people want it to be. Call me spoiled / ruined for having spent so much time on Firefox, but I just can’t use it to be as productive as I want to be so I’ve installed Firefox on my Kubuntu installation. For those of you that are in similar situations keep reading and find out how to manually install Firefox within KDE.

Now, I am perfectly aware that I can download and install the Firefox package simply and easily using Adept or aptitude. I have one very key reason why I don’t want to do it this way. I don’t want the pile of gnome dependencies that come with it. If I’m going to run KDE I want to run a clean KDE, and adding GTK clutter is not on my agenda. So, manually installing Firefox is nearly as easy and makes for a much cleaner installation in my mind.

Installing Firefox Manually

Update: I found in some additional testing that using the following command *just* installed Firefox and none of the other packages so.. you take your pick: (I normally use aptitude to install which installed optional packages as well).

sudo apt-get install firefox

OR

  1. Download the latest version of Firefox from the Mozilla web page. Save this file to disk.
  2. sudo tar -C /opt/ -zxvf firefox-*.tar.gz
  3. sudo aptitude install libstdc++5
  4. sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox
  5. sudo vim ~/.local/share/applications/firefox.desktop

Put the following content into the newly created file:

[Desktop Entry]
Comment=Firefox Web Browser
Exec=firefox
GenericName=Web Browser
Icon=/opt/firefox/icons/mozicon128.png
Name=Firefox
Path=
StartupNotify=true
Terminal=0
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

Done. You should now be able to launch Firefox either from the command line (firefox) or from your KDE menu within the Internet section. When a new release of Firefox comes out you should simply be able to repeat steps #1 and #2 and you’re done. I will be running Firefox as my default browser on Kubuntu and using this method I don’t have to deal with the gnome dependencies cluttering things up!

30 thoughts on “Manually Installing The Latest Firefox in Kubuntu : A Cleaner Installation

  1. Wolfger

    Does it really make a difference?
    If so, why is there no KDE-oriented Firefox package? Sounds like a job for MOTU! 😉

  2. JValdezjr

    What about Opera instead of Firefox? Also, don’t you get a lot of GTK stuff when you install GIMP?

  3. pvandewyngaerde

    and is this with gnash enabled ?

  4. nosrednaekim

    What dependencies did you specifically not want?

    Looking at the dependencies, it seems to me that most of them are necessary for firefox to run. They are probably also included in the static binary.

  5. James Stansell

    First, you’re not losing the “GTK cruft” – you’re just installing unpackaged versions of it. I’m 99% sure that all the GTK libs that Firefox depends on are in that tarball that you’ve extracted.

    Second, there are both a wiki page and an ubuntuforums post about how to do this, with some extra information for people. It’s been a while but the last I looked at them I don’t remember a KDE angle mentioned. I’ll look those up if I get a chance.

    Overall, I’m not opposed to sysadmins knowing how to install compiled versions from upstream projects. But I’m pretty wary of suggesting it most of the time.

    Regards,

    -james.

  6. Alex

    I think a simple apt-get install firefox will not grab the GNOME dependencies. I think it’s the firefox-gnome-support package that aptitude wants to install that brings GNOME on board. apt-get won’t try to install that, since it’s only suggested, not required or even recommended.

  7. Lane

    Although I try Ubuntu from time to time, I keep coming back to Kubuntu; it just feels more comfortable. But I agree, Firefox is the only way to go. I prefer some Gnome programs anyway (Gedit, Synaptic…) so I probably have all the Gnome stuff anyway.

  8. Nat Budin

    I assume you’re talking about things like GTK+ and GLib, which as a previous commenter pointed out, you’d be getting statically linked into the binary anyhow. The main difference between what you did and using apt-get is that by downloading the static binaries, you’re installing a separate copy of those libraries that other applications can’t use. Definitely not cleaner, IMO.

  9. A Debian User

    Besides all the other good reasons already posted for not doing it this way, don’t forget automatic updates. Yeah, Firefox has those built in, but I don’t know if those will also pull in all of the GTK-related stuff. And that also means that you have to update your system and Firefox, rather than having standard system updates pull in both. :/

    Is hard disk space at such a premium that the “clutter” of GTK or GNOME libraries is a problem? Is your connection so slow that downloading them is a problem? If so, ok; otherwise I don’t understand the point.

  10. Peter

    This is rare with your posts, but this one is misleading. I think the reason for the confusion is the fact that you use aptitude. Its policy is to also install the recommended packages, which IMHO is a bad thing. If you used apt-get instead, you wouldn’t get all the useless GNOME clutter. And the little GTK dependencies aren’t evil, and they won’t interfere with KDE in any way.

    Best Regards,
    Peter

  11. MadMike

    While it is handy that it is so easy to compile applications under Linux, one has to remind themselves that you will to repeat the procedure on every update… especially on every security related update for internet-enabled apps like Firefox.

    Having apt-get look for any updates of the installation base and updating them on my OK is one of the many advantages Linux has over its competitors.

  12. Pingback: Refresh The Katapult Launcher in Kubuntu : Ubuntu Tutorials : Dapper - Edgy - Feisty - Gutsy

  13. maybeway36

    apt-get also follows recommendations, so this isn’t an aptitude thing. The problem is that it wants to install ubufox, so just go in aptitude, mark firefox for installation, and unmark ubufox.

  14. Yorokobi

    You can install Firefox in KDE without all the GTK/Gnome add-ons that it seems to require. Firefox recommends ubufox which requires a lot of the fluff. From a clean install of Kubuntu (Gutsy) I installed Firefox sans ubufox and all the other cruft. Any link libraries are already installed so there are no worries there.

    From the ubufox description: “You can uninstall this package if you prefer to use a genuine firefox install.” [sic]

  15. Yorokobi

    Slight correction, ubufox requires apturl which requires the extra junk and you end up with a cascade effect of packages requiring packages. A lot would be solved if the firefox package did not try to install ubufox as well.

    My $0.02

  16. Pingback: Ubuntu - The Operating System » Blog Archive » Refresh The Katapult Launcher in Kubuntu

  17. rishav

    hello , i am using the kubuntu 7.10 but its unable to fetch packages using aptget

    and when i used the manual method , in the last step i am unable to save the contents in the file. some help thanx

  18. TimoX

    Shouldnt it be “2. sudo tar -C /opt/ -jxvf firefox-*.tar.bz2”?
    -Firefox gives out Bz2 files, not .gz

    ..and step 5 needs some further configuration, it doesnt put Firefox shortcut on desktop nor in the menu.(Im guessing username to be filled in, but Im a fresh convert from Windows..)

  19. Daniel Burgess

    Sorry, but I still cannot install it.

    When I used “sudo apt-get install firefox”, I get only this message:

    “E: Type ‘home/Documents/firefox/firefox’ is not known on line 56 in source list /etc/apt/sources.list
    E: The list of sources could not be read”

    When I typed “sudo tar -C /opt/ -zxvf firefox-*.tar.gz”, the second part of the text, I got

    “tar: firefox-*.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors”

    Even now, I cannot install the Mozilla I downloaded.

    How do I install a copy of Mozilla on my Kubuntu? Thanks a lot.

  20. Cosimo Giosa

    ho provato a installare Firefox seguendo le istruzioni, ma non ci sono riuscito.
    non esiste un pacchetto autoinstallante, x Kubuntu 7.1???

  21. James

    Just installed firefox using “sudo apt-get install firefox” on a hardy 8.0 lamp server from the command line. Everything seemed to work thru, but when I type in firefox at the command prompt I get Error: no display specified. Can someone please help.

    Thanks in advance

  22. marco

    I just installed Firefox on kubuntu 7.10, everything went fine until the fifth step, i can’t get vim to save Firefox.desktop. i only get a swap file, could you explain that step a little more?
    Thanks in advance

  23. misha

    Flagfox version 3.3.5
    Detected Firefox version 3+ using locale en-US

    ERROR MESSAGE: Flagfox failed to load!

    EXCEPTION THROWN: Could not load country names

    OPTIONS: customlookup.enabled=false; customlookup.name=Google; customlookup.url=http://www.google.com/search?q=site:{domainName}; middleclick=Whois; openlinksin=tabFG; position.bar=addressbar; position.side=R; usealticons=false; warn.proxy=true; warn.tld=false; warn.updates=true;

    USER AGENT: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008111317 Ubuntu/8.04 (hardy) Firefox/3.0.4

  24. misha

    o sorry i forget it was after installation

  25. Ryan

    To those of you that claim the Firefox from mozilla will have the same dependencies built in… you clearly didn’t pay attention to what you installed. When marking Firefox for installation, it automatically marks the following packages for install which are surely not in the mozilla binary:

    Synaptic
    gnome-keyring
    libgnomevfs2-0
    libgnome2-0
    scrollkeeper
    gnome-mount

    and many more.

    These are absurd dependencies for a web browser. Why the hell would you need Synaptic package manager to run firefox?

  26. z_mikowski

    This takes care of it all:

    sudo apt-get install firefox –no-install-recommends

    See man apt-get and search for “recommended” for more details.

  27. Will Mellon

    I think I’m missing something, because my KDE system, through Adept, will not allow me to install anything beyond the 3.0 firefox. And I have no clue what I’m supposed to do with the code listed in this article. Can you help?

  28. stephanie

    THIS is what Linux is all about: easy automated tasks, so that you can get onto important world-saving work, rather than tinkering with the computer.

    This takes care of it all:

    sudo apt-get install firefox –no-install-recommends

    See man apt-get and search for “recommended” for more details.

Comments are closed.