Installing Firefox 3.5 In Ubuntu (completely)

Posted in Guides, Linux, Ubuntu by aliencam | 3 Comments »

Firefox 3.5 came out a few days ago, and I always want to have the most updated version of everything. It won’t be in the Ubuntu repositories until 9.10 is released.

First step is from Lifehacker, it downloads and unpacks the file from the firefox website.

Open a terminal window and enter:
wget -O - http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.5/linux-i686/en-US/firefox-3.5.tar.bz2 | tar xj -C ~

Now, this shouldn’t overwrite firefox 3.0, but we need to move it to the mozilla folder, so use the following command:

mv ~/firefox/ ~/.mozilla/firefox3.5/

Now, make a symbolic link to firefox 3.5 in the equivalent of a “programs” folder (/usr/bin in Ubuntu):
sudo ln -s ~/.mozilla/firefox3.5/firefox /usr/bin/firefox-3.5

NOTE: you may only have one version of firefox open at one time. To open Firefox 3.5, you must completely close all other versions of firefox.

Now to set the firefox icon to the new firefox program (when opening in gnome-do and if you make a panel shortcut) open your home folder, hit ctrl-h (to show hidden files), go to .mozilla/firefox-3.5, right-click on the “firefox” in there, go to “properties” then left-click on the icon (top left corner). Now go to Pixmaps on the left (or /usr/share/pixmaps) and select firefox-3.0.png.

Now, there are a few ways to set up a shortcut to open firefox. One of the easiest is to add it to the program menu. Open the menu and go to System > Preferences > (Display >) Main Menu. Now open the “Internet” section (in the left column), and create a “New Item” with name: Firefox 3.5, command: firefox-3.5, and once again, the icon should be /usr/share/pixmaps/firefox-3.0.png.

Another method is, if you use gnome-do, just open it (alt-space) and when you start typing “firefox,” hit the down arrow and select “Firefox 3.5” (I think this only shows up after a restart, or if you add the firefox 3.5 menu item above).

Firefox 3.5 has some interesting quirks though. Flash will not work for it unless you copy your plugins into it.

In Ubuntu though, you need to copy plugins for multiple locations. Use this set of commands to copy all the plugins:
cp /usr/lib/flashplugin-installer/libflashplayer.so ~/.mozilla/firefox3.5/plugins/ && cp /usr/lib/mozilla/plugins/* ~/.mozilla/firefox3.5/plugins/

you also need to disable the strange middle-mouse behavior in 3.5. go to about:config in firefox, click the “I’ll be careful I promise!”, and go to: middlemouse.contentLoadURL and if it is true, double-click on it to make it false.

the only thing I have yet to figure out is why all the fonts in firefox 3.5 seem to be blurry, while 3.0 was perfect… To me it is like the difference between subpixel smoothing and high contrast font rendering modes… see the screenshots below. (left is non-blurry firefox 3.0, right is blurry firefox 3.5)
ScreenshotScreenshot-1

UPDATE: There were a few forum topics about this issue, but nobody had a definitive solution. Many possible solutions, but many of them were kind of strange, and many did not work.

Here is what worked for me:

open a terminal, and this first step is a backup just in case the next step messes up your system’s fonts.

sudo cp /etc/fonts/conf.d/10-hinting-slight.conf /home/$USERNAME/Desktop/
sudo cp /etc/fonts/conf.d/10-no-sub-pixel.conf /home/$USERNAME/Desktop/

Now, the files were just copied to your desktop, here are the next two commands:
sudo ln -s /etc/fonts/conf.available/10-hinting-medium.conf /etc/fonts/conf.d/.
sudo ln -s /etc/fonts/conf.available/10-sub-pixel-rgb.conf /etc/fonts/conf.d/.

And finally, you need to reset fontconfig:
sudo dpkg-reconfigure fontconfig

Once this finishes, restart Firefox to see the new fixed font rendering engine! You should also restart your computer to ensure that removing those files did not do any harm. If you restart and you can still see text, then you are okay to:
sudo rm /home/$USERNAME/Desktop/10-hinting-slight.conf /home/$USERNAME/Desktop/10-no-sub-pixel.conf

Now you are finished!

Ubuntu Setup Guide II. Update and Repository Setup

Posted in Guides, Linux, Lists, Ubuntu by aliencam | No Comments »

Enabling Repositories


Before updating or installing any programs, you should enable more repositories. By default, you will only get security updates, recommended updates, and updates of proprietary drivers / nonfree software in the repositories. With this it is most likely that an update will not break anything new, but you will have older versions of everything.

In order to do this, go to System > Administration > Software Sources, then enter your password and go to the “Updates” tab.

Check both the “Pre-Released Updates” and the “Unsupported Updates” boxes. Pre-released updates means updates that will go into the next 6-month ubuntu release, but did not make the cut for this one, and unsupported updates are updates that are not widely tested for stability yet. Neither are necessary, but I like both of them.

Now, go to the “Third-Party Software” tab and enable both of the repositories there. These “partner repositories” enable the use of non-free software, like flash, mp3 codecs, dvd codecs, and similar. I would say these are necessary unless you want to keep your computer 100% open source (in which case I applaud you for being much more intense than I could stand to be right now).

Then, go to the “statistics” tab, and choose whether or not you want to submit statistical data to Ubuntu. I like to do this because it lets them know how many people are updating, and installing which programs from the repositories. Essentially it helps programs you like to use in the popularity contest of “default” programs.

Another optional step is to choose a different server. This can sometimes get your updates much faster, because you won’t be downloading from the same server as everyone else in the world. To do this, go back to the “Ubuntu Software” tab, and on the “Download From:” dropdown menu, choose “other” and then click “choose best server.” It will now run a series of tests to choose which server you are able to connect to and get the fastest speeds. When it finishes, it will automatically select the best choice, click “choose server,” then “close” and “close” again (the update button never works for me).

Now open up a terminal (Applications> Accessories > Terminal) and type sudo apt-get update, then sudo apt-get upgrade.

Fixing Update-Manager Behavior


I don’t like how update-manager behaves in this new version. What happens now is that once per day the update-manager window will open completely, but if you close it, you won’t see it until a week later unless you restart the computer. I prefer it to show an icon in the taskbar telling me that I need to update, and never pop up the update window.

Here are the steps to get back the old update-manager behavior (from the Release Notes):

Open a terminal (Applications > Accessories > Terminal) and enter the following:


gconftool -s --type bool /apps/update-notifier/auto_launch false

Now you will have an icon in the taskbar if you have available updates.

Restricted Extras


By default, Ubuntu can’t have certain things installed like MP3 codecs, flash player, MS fonts, and Java. You probably will want to install all of these, and thankfully if you have enabled the repositories above, there are two packages that handle most of this.
open a terminal and enter:
sudo apt-get install ubuntu-restricted-extras linux-restricted-modules

enter “y” when it asks you if you want to install all the packages, then let it run.

During installation you should be prompted (in the terminal window) to setup Java, When this happens, scroll down to the bottom with either page-down or the down arrow key, then arrow to the right to get to “ok”. Hit enter, then move the selection left to “Yes” and hit enter again.

You now should be able to do these things.

Adobe Flash 10 and Google Gears on Firefox in 64-bit Ubuntu!

Posted in Guides, Life in General, Linux, Lists by aliencam | 1 Comment »

It makes almost no sense nowadays to be using a 32 bit operating system, however, there are still many problems with using a 64 bit version of firefox, like the one shipped with 64-bit editions of Ubuntu.  The main problems are that a few addons don’t support the 64 bit version, and flash 9 is very unstable.  It was not impossible to find information on the internet explaining how to fix the issues with Flash and Google Gears, without messing up anything else.

The solution that I found to unstable flash in 64-bit Ubuntu was to use the new version of flash, 10.  Flash 10 is still not in the repositories, and probably will not be until the next release of ubuntu (curse you feature freeze!), but some people on the ubuntu forums have posted how to get Flash 10 installed in firefox, it is really quite easy using their script. If you don’t want to follow my interpretation of the instructions, you can read the topic for yourself at http://ubuntuforums.org/showthread.php?t=954100

Flash 10

Go to System > Administration > Software Sources and then to the Third Party Software tab. click Add and add the line: 

deb http://ppa.launchpad.net/psyke83/ubuntu intrepid main

This repository has flash 10, and a new version of pulseaudio as well, so that will get upgraded along with everything else.

Hit “Close” let it refresh, then close again.  make sure you DO NOT do software upgrade right now, it will break things.

if you have not already, install the getlibs package, which is extremely useful for installing 32-bit software in 64-bit ubuntu. (install it by clicking that link and downloading the package on that page, then clicking on the downloaded package and installing it. )

then make a new file anywhere, and as it’s contents paste in the following:

#!/bin/bash
# Script  created by
# Romeo-Adrian Cioaba romeo.cioaba@spotonearth.com
# Super minor updates by jason.melton[at]gmail[dot]com
# Another minor update by tal.liron[at]gmail[dot]com
# Released under GPL

echo "Stopping any Firefox that might be running"
sudo killall -9 firefox

echo "Removing any other flash plugin previously installed:"
sudo apt-get remove -y --purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

echo "Installing ia32-libs and nspluginwrapper"
sudo apt-get install ia32-libs nspluginwrapper

echo "Getting libs"
sudo getlibs -p libcurl3
sudo getlibs -p libnss3-1d
sudo getlibs -p libnspr4-0d

echo "Installing Flash Player 10"
cd ~
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar zxvf install_flash_player_10_linux.tar.gz
sudo cp install_flash_player_10_linux/libflashplayer.so /usr/lib/mozilla/plugins/
rm -rf ~/install_flash_player_10_linux/
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

echo "Linking the libraries so Firefox can find it."
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/firefox-addons/plugins/

echo "Done :-)"

I am really sorry to do this, but you will now have to manually replace all of the open and close quotation marks in that block of code with regular quotation marks. If you use gedit to paste all that information in, then you can use “find and replace”, paste a curved open quote into the find box, then replace all with a regular quote that you type, then do the same for the close quotation.
(Note: I just found a wordpress plugin that will let me disable smartquotes on certain posts, I will be installing that ASAP)

after replacing all the quotes, save and close the file. right-click on it and go to properties, then permissions, and check the “enable executing this file as a program” box. Then open a terminal, and you can either type the path of the file into the terminal and execute it, or just drag the file into the terminal, go back to the terminal and hit enter.

It should ask you for your admin password, then ask you to press “y” a few times, and then if you get “Done :-)” displayed in the terminal, everything should be good. Your Firefox now has Flash 10 installed!!!


Google Gears in 64-bit Firefox!

According to the official Google Gears FAQ, there are two ways to install gears in a 64-bit edition of firefox.  The first one is using “nspluginwrapper” (which makes little to no sense because gears is an addon, not a plugin and as such cannot be wrapped), and the second option is to use a patch documented on the google groups.  The problem with the patch is that most people don’t know how to patch and build source. However, some nice person has patched version 0.4.9.0 (which is a recent version) and posted the compiled addons on their website.  All you have to do is go to http://www-personal.umich.edu/~swolchok/gears/ and download the most recent file anywhere, then in firefox go to File > Open File and select the .xpi file.  Firefox will then install the addon and the only issue will be that every once in awhile you get an error message saying that firefox cannot update the extension because your browser is 64-bit.  Just ignore it and check that website to see if a new version has been posted, it does not interfere with any of the other extensions from being updated.  This guide was taken from HERE.
If you still want to patch and build the latest svn yourself, the patch is located at http://groups.google.com/group/gears-users/browse_thread/thread/4584842dd14a4882 and the SVN is located at http://code.google.com/p/gears/source/checkout

that is all.

-aliencam

Creative Commons License