0

I downloaded Firefox from the official website.

I've extracted the tar.bz2 and moved the folder to /opt/firefox. My questions are:

  1. Is opt the right place to place the Firefox folder?
  2. I don't want to always open up a terminal to run firefox. Is there a way I can launch Firefox from the Unity toolbar (and be able to see it as the standard firefox icon)?

UPDATE:
It's an Ubuntu 14.04.4 LTS. Release: 14.04. Important note: I'm not asking about installing from PPA. I'm asking about being able to launch the tarball extracted version from the Unity toolbar, but the icon shown on the toolbar should be the Firefox icon.

Nav
  • 1,059
  • 1
    What version of Ubuntu are you running? Also, what do you mean it only provides an old version? I installed Firefox from there and it always gives me the latest, like right now I am running Firefox 45 which is the latest and installed from there. So which 'old' version is it providing you in there and which version have you now downloaded? –  Apr 20 '16 at 17:22
  • I recommend not installing from a tarball, but using the official PPA as described in this question: http://askubuntu.com/q/6339/367990 – Byte Commander Apr 20 '16 at 17:27
  • See the manual part in http://askubuntu.com/a/548005/158442 – muru Apr 20 '16 at 17:41
  • Dear people. My actual question was about how to get the extracted version of Firefox's icon on the Unity toolbar and to be able to launch if from there. @muru: I tried the manual part, but even that does not say how it could show up on Unity. Do you guys even get the question? I'M NOT ASKING ABOUT PPA!!! Could someone at least understand the question before casually downvoting? – Nav Apr 21 '16 at 18:14
  • Firefox 32 is antique. It's 45 on 14.04. – muru Apr 21 '16 at 18:19
  • Is it possible that you have to add firefox in installed apps log and that then it would appear in the dash? – NonStandardModel Apr 22 '16 at 10:56
  • @DavidFoerster: Not exactly. My question specifically asks about how to be able to launch from the Unity toolbar, and this has never been asked before. Paranoid Panda gave an excellent answer! – Nav Apr 24 '16 at 05:16

2 Answers2

8

The most up-to-date one should be available from the Software Center on a supported version of Ubuntu, perhaps you should make sure that your software sources are up-to-date by running the Software Updater or this in Terminal (CTRL + ALT + T):

sudo apt-get update

If you still do not get the latest then you are either running an End-Of-Life version of Ubuntu (in which case you should upgrade to continue receiving updates and support - including from this site) or you have some other system problem or you are wanting the latest Beta version. If it is the Beta version you want then you can add the official Mozilla Firefox Beta PPA with:

sudo apt-add-repository ppa:mozillateam/firefox-next
sudo apt-get update

And then upgrade to the Beta version with:

sudo apt-get dist-upgrade

However to directly answer your question, if you still want just to use the version which you have downloaded then follow these instructions:

Please note that it may be advisable to uninstall the Firefox you have from the repositories first (run sudo apt-get remove firefox in Terminal (CTRL + ALT + T)).

  1. Place the unzipped tarball in /opt (this is the ideal place to place something like this - though you will need to be root to do this (you can use sudo cp -r /file/path/to/unzipped/firefox/folder/ /opt/firefox)) - this should be a folder called firefox

  2. In Terminal run the command sudo -H gedit /usr/share/applications/newfirefox.desktop

  3. Put the following into the file and save it:

    [Desktop Entry]
    Version=1.0
    Name=New Firefox Web Browser
    Comment=Browse the World Wide Web
    GenericName=Web Browser
    Keywords=Internet;WWW;Browser;Web;Explorer
    Exec=/opt/firefox/firefox %u
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=/opt/firefox/browser/icons/mozicon128.png
    Categories=GNOME;GTK;Network;WebBrowser;
    MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
    StartupNotify=true
    Actions=NewWindow;NewPrivateWindow;
    
    [Desktop Action NewWindow]
    Name=Open a New Window
    Exec=/opt/firefox/firefox -new-window
    
    [Desktop Action NewPrivateWindow]
    Name=Open a New Private Window
    Exec=/opt/firefox/firefox -private-window
    
  4. Now when you search for Firefox in the Unity dash you should see an icon with the Firefox logo called New Firefox Web Browser, if you click on that you will get the Firefox which you put in /opt, you can also pin it to the Unity Launcher by right-clicking on it then once it is open and clicking the Lock to Launcher button:

    Lock to Launcher button

When a new version of Firefox comes out simply download the tarball for that, unzip it, and place the firefox folder in /opt (replacing the old one obviously).

  • Thanks @Paranoid, but you haven't really answered my question (but have been quick to downvote, apparently). I'm asking how do I get a downloaded version to show up on Unity? – Nav Apr 21 '16 at 14:21
  • @Nav: I will look into that and soon update my answer. –  Apr 21 '16 at 19:51
  • @Nav: I have now updated my answer to address your actual question. –  Apr 22 '16 at 10:34
  • Very well explained, @Paranoid. Works beautifully. I'm amazed at how you found out how to accomplish this. Thank you very much for your help! – Nav Apr 22 '16 at 13:26
0
  1. Yes, it totally depends on your decision. But I think /opt is OK, remember in the /etc make a separate folder first:

    sudo mkdir YOURFIREFOXFOLDERNAME
    
  2. After you successfully installed Firefox, click on the Dash and search for "firefox". When you find it, open it:

    Next, if you want to have it all the time on the Launcher, just right click on the Firefox icon from the Launcher when it is opened and select "Lock on Launcher":

This the simplest way.

muru
  • 197,895
  • 55
  • 485
  • 740
Zaman
  • 11
  • If Firefox appeared on the dash, I wouldn't have asked the question here. How would a program appear on the dash just because I paste a folder in /opt? – Nav Apr 21 '16 at 17:48