How do I install xulrunner?

xulrunner is no longer available in the repositories for 12.04, but it's very easy to install the latest versions provided by the Mozilla Foundation here. Since these xulrunner releases are self-contained, we'll put them in the /opt directory.

  1. Open the terminal with Ctrl+Alt+T
  2. Type cd /opt
  3. The below steps will automatically download the appropriate version of xulrunner based on the currently installed version of Firefox and whether your Ubuntu is 32-bit or 64-bit. (If you are running a Firefox beta, etc., please copy the URL manually from your browser and set XURL= to it (see below)

    • Copy and paste in the terminal, line by line:
    FFVER=`grep -Po  "\d{2}\.\d+" /usr/lib/firefox/platform.ini`
    ARCH=`uname -p`
    XURL=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$FFVER/runtimes/xulrunner-$FFVER.en-US.linux-$ARCH.tar.bz2
    cd /opt
    sudo sh -c "wget -O- $XURL | tar -xj"
    sudo ln -s /opt/xulrunner/xulrunner /usr/bin/xulrunner
    sudo ln -s /opt/xulrunner/xpcshell /usr/bin/xpcshell
    

xulrunner is now installed, and can be run with simply xulrunner from anywhere.

  • To uninstall it, simply remove the xulrunner directory under /opt, and the /usr/bin/xulrunner and /usr/bin/xpcshell symbolic links.

I had similar issue with Eclipse failing. I was able to get my version of Eclipse working, by doing the following. You can do this for your intended applications.

  1. To find the version of XULRunner supported for your Eclipse version: http://www.eclipse.org/swt/faq.php#browserlinux
  2. Go to Mozilla XULRunner releases downloads. Choose the version you want. Ignore b* suffixed versions (beta), and try to opt for latest. Again, its your choice to go for required version.

    [DIR]   10.0.1/         09-Feb-2012 01:11   -    
    [DIR]   10.0.2/         16-Feb-2012 02:55   -    
    [DIR]   10.0.4esr/      22-May-2012 20:56   -    
    [DIR]   10.0/           29-Jan-2012 11:32   -    
    [DIR]   10.0b2/         28-Dec-2011 10:38   -    
    [DIR]   10.0b3/         08-Jan-2012 03:02   -    
    [DIR]   10.0b5/         18-Jan-2012 15:27   -    
    [DIR]   10.0b6/         24-Jan-2012 03:53   -
    

    I am installing 10.0.2 in this example.

  3. Choose the download based on your OS.

    I am running 32bit Linux so I go for xulrunner-10.0.2.en-US.linux-i686.tar.bz2

  4. Save the downloaded file, extract/install it.

    sudo tar -xjvf xulrunner-10.0.2.en-US.linux-i686.tar.bz2
    
  5. Set the path of xulrunner in the application file (eclipse.ini).

    -Dorg.eclipse.swt.browser.XULRunnerPath=/Path_where_xulrunner_is extracted/xulrunner/
    

Now Eclipse will use the given version of xulrunner installed.