Firefox tweaks and GNOME 3

When I used KDE I integrated my favorite browser, Firefox, into KDE 4 pretty well using add-ons and themes. Nowadays I use Fedora with GNOME 3 so I looked into integrating Firefox in that as well. I also show a tweak I use to speed Firefox up a bit and save my SSD at the same time and installed Flash on Fedora 20 to finish it off.

Blending in

Because Firefox is a GTK application it integrates pretty decently into the GNOME desktop out-of-the-box, but there is still lots of room for improvement. It could lose it’s title bar, because more native GNOME apps don’t use those anymore, the menu needs to bugger off into a button, and it would be great if that button could look like it does in most other GNOME apps (like a cog in the top right corner). Besides making it look more native it also saves precious screen space on my 13” laptop screen. I used the following add-ons and tweaks:

Add-ons I installed for this purpose:

  • GNOME 3, themes Firefox accordingly
  • HTitle, removes the window title.
  • FxButton, use it to move button to the right and integrate better according to GNOME HIG

Two other add-ons I’m currently checking out:

  • GNotifier, don’t think I need it. See for yourself whether it makes a difference.
  • GNOME Theme Tweak, “Show tabs on top” can be turned off to fit better into GNOME HIG, but I left it on for now because I’m used to it. I’m also playing with the other settings to see if I like them or not. If you just want to toggle tabs on top I believe you don’t really need this add-on, because this can be done from about:config with key browser.tabs.onTop.


Disable the Menu Bar

I hardly ever use any of the items in the Menu Bar, so I disable it to save space. Most of the options in here are available below the Firefox or Cog button anyway. You can turn the bar off with the option in View > Toolbars > Menu Bar. To get it back: press CTRL+V and enable the option again.

Keep Firefox cache in RAM

I do this to reduce writes to my SSD and it also speeds up browsing a little bit when going back a page or searching in them. There are multiple ways to do this. The easiest is telling Firefox to use only a memory cache by disabling the disk cache and enabling the memory cache in about:config. However, there is a downside to this: Whenever your browser crashes, seldom as that may be, you will have lost your session as well. I prefer to have the option of restoring my session during such an even. I don’t like to lose lots of tabs while researching something and Firefox crashes because some Flash applet decided not to play nice today… For me a session lost equals time lost, rusulting in an unhappy me.

To work around the issue, but still use a memory only cache, I relocate the disk cache to RAM. In other words: I tell Firefox to put its disk cache in another location, and have that location be a tmpfs. And instead of making a new one, I use an existing location present in pretty much all Linux distributions: /dev/shm (or /run/shm in Debian), and have Firefox create a subdirectory in it for the cache.

  1. Open about:config
  2. Create a new key called browser.cache.disk.parent_directory (right-click > New > String)
  3. Enter /dev/shm/firefox-cache as the string value

The new cache location will be used after Firefox is restarted. You can now remove the old disk cache, often located at ~/.cache/mozilla/firefox/xxxxxxxx.default/Cache, where the 8 x’s represent a string of alphanumerical characters to identify your profile.

Install Adobe Flash on Fedora 20

That pesky Flash plugin we can’t seem to get rid of just yet… As you can probably decipher from my tone I do not like Adobe Flash very much, but there are still websites that depend on it, so I do try to have it available. Luckily installing it on Fedora is not that hard:

$ sudo yum install -y
$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
$ sudo yum check-update
$ sudo yum install flash-plugin -y