How to change Firefox double-click selection behavior

When you double-click text in Firefox, what is selected depends on the punctuation characters that are inside or around the text. By default, punctuation characters like dashes are not part of the word. So, you might find that a word-like-this is not fully selected on double-click.

This selection behavior is controlled by the preference layout.word_select.stop_at_punctuation. You can go to about:config and change it if you would prefer that punctuation characters be ignored.

uMatrix window too small in Firefox 56


I upgraded to Firefox 56 and immediately noticed that the uMatrix dashboard window was too small. I could not view some of the columns to the right.


The solution seems to be related to the Photon UI of Firefox. Go to about:config from the location bar and set the config option browser.photon.structure.enabled to true. The effect is immediate and your uMatrix dashboard should be back to full size again.

Tried with: Ubuntu 16.04

Firefox tooltip with terrible colors


The tooltip used by Firefox was being shown in terrible and unreadable colors. It was black foreground text on black background!


This was on an Ubuntu computer where the desktop environment had been switched around between Unity, XFCE (Xubuntu) and finally KDE (Kubuntu). I realized that the tooltip in Firefox was being rendered by the desktop environment and was using its theme. And possibly the theme settings had been mauled to death by the switch between desktop environments.

To set this right, in KDE I opened the System Settings application. Here I found my way to Application Appearance → Colors dialog. Here go to Colors tab → Tooltip. You can pick the colors you want from the dropdown and click Apply once done. They should be reflected in Firefox tooltips immediately after this.

Tried with: Firefox 55.0.2 and Ubuntu 16.04

How to take screenshot of webpage in Firefox

I can print a webpage to PDF, but there are times when I need to take a screenshot of the entire length of a webpage. For example, a lot of formatting is lost when printing. So, a screenshot is better since it gives you the entire length of the webpage exactly how it is rendered in the browser. Thankfully, there is no need to install any extension to do this in Firefox.

  • Enable the screenshot option: Press F12 to open the Developer Tools. Click on the ⚙ (gear) icon on the right. In the Available Toolbox Buttons section, enable the Take a screenshot of the entire page option. A 📷 (camera) icon will appear to the left of the ⚙ (gear) icon. From now on, this 📷 (camera) icon will be available in Developer Tools.
  • Take a screenshot: Open the webpage you want to take a screenshot of. Press F12 to open Developer Tools and click the 📷 (camera) icon to take a screenshot. It will be saved in your Downloads folder as a PNG image by default.

Tried with: Firefox 53.0.2 and Ubuntu 16.04

uMatrix extension for Firefox


uMatrix is an addon for Firefox which you can use to control exactly what network requests are made by the browser and thus what is loaded in the webpage you have requested. It is of similar use as ad-blockers (like AdBlock) or script blockers (NoScript) or other blockers like uBlock. But, uMatrix is more fine-grained and a bit more complicated but gives you a lot more idea of what a webpage is trying to load and if you want to allow that. uMatrix is a fork and improvement over an earlier addon called HTTP Switchboard.

  • Install: It can be installed from here. No browser restart is required. You will find its icon added to the toolbar.

  • Settings: Before you try anything, head over to its dashboard. In the Privacy tab, you can turn off the feature of clearing browser cache every 60 minutes. The My rules tab is where you can find the list of rules that are applied by uMatrix to decide if a network request on a webpage should be allowed or not. You will find the default rules that uMatrix starts off with under Permanent Rules and the rules that you have set under Temporary Rules. Do not worry if it looks complicated cause you usually set these rules using the colorful 2D matrix UI of uMatrix. In the Hosts files tab, click the Update Now button to update all the hostnames to block from the various popular lists maintained on the internet.

  • Content is blocked by default: By default, uMatrix blocks all types of content from the blocked hostnames (see above) and allows CSS and image content only from the domain you are visiting. Many websites may not render or work correctly due to this and you will need to step in to tell uMatrix to allow other content from other domains. This default behavior is called Block All / Allow Exceptionally. To allow everything by default is called Allow All / Block Exceptionally. You can find detailed information about these two modes here.

  • Control content: On any webpage, click the uMatrix icon in the toolbar to reveal the 2D matrix where you can click to enable or disable loading from particular hostnames (the rows) or loading particular types of content (the columns). Red color means disabled and green means enabled. Clicking upper part of a cell enables and lower part disables. Clicking rows or columns should usually be enough, if you want finer control you can click the cells, that is controlling a particular content from a particular hostname. Click the Refresh icon to re-render the webpage with these changes. The rules you set here are the rules you can see in the Dashboard (see above).

  • Whitelist a domain: The top-left cell is the Z axis to this 2D matrix. Clicking it you can choose if you want to set rules for every page (asterisk) or this particular hostname. For example, if I enable in the every page (asterisk) section, then content coming from will be allowed no matter which website I visit.

  • Undo or Save: Click the Lock icon to save the rules for this webpage. Click the Eraser icon to revert back to last saved rules for this webpage.

  • Persist settings: By default, the rules you painstakingly set for websites will persist only in a Firefox session. They will be forgotten if you restart Firefox. To make them persist, go to the Dashboard → My Rules section and move the rules from Temporary Rules to Permanent Rules section.

  • Default rules: Just for reference, when uMatrix is installed freshly, it starts off with these rules:

https-strict: behind-the-scene false
matrix-off: about-scheme true
matrix-off: behind-the-scene true
matrix-off: chrome-extension-scheme true
matrix-off: chrome-scheme true
matrix-off: localhost true
matrix-off: opera-scheme true
referrer-spoof: behind-the-scene false
ua-spoof: behind-the-scene false
* * * block
* * css allow
* * frame block
* * image allow
* 1st-party * allow
* 1st-party frame allow


Tried with: Firefox 50.1.0 and Ubuntu 16.04

Selenium error on geckodriver


I updated Ubuntu packages, which included Firefox and I updated Selenium using pip3 cause that also depends on the Firefox version. But running my existing Python scripts that use Selenium popped this error:

FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'


Firefox now provides the geckodriver as a separate binary. You can download the version matching your OS and CPU here. Unzip the file and place the binary anywhere that is in your PATH. Your Python scripts should work now.


Tried with: Firefox 49, Selenium 3.0.1 and Ubuntu 16.04

How to use KeeFox in Ubuntu

KeeFox is an open-source extension for Firefox to use your KeePass program to fill login-password forms on websites. You could do this manually by opening KeePass and using it to find the login-password or to generate a new password or update the credentials. KeeFox makes it easy to do these operations directly from the browser.

$ sudo apt install keepass2
  • Open KeePass and create a password database and a master password. Get comfortable using KeePass. Configure it to open your default password database file on startup.

  • Install the complete Mono package:

$ sudo apt install mono-complete
  • Make sure you install mono-complete. Just because you have /usr/bin/mono does not mean that this package is installed. If you do not install this, you will later face a plugin incompatibility error.

  • Install the KeeFox extension in your Firefox from here.

  • We now need to create a plugins directory in our KeePass installation and copy the plugin file provided by KeeFox to that location:

$ cd /usr/lib/keepass2/
$ sudo mkdir plugins
$ sudo cp $HOME/.mozilla/firefox/*.default/extensions/keefox@chris.tomlinson/deps/KeePassRPC.plgx plugins
  • Open KeePass. If you had it open, close it and open it again. It should acknowledge that the new plugin that you installed in the above step. Keep it open for the steps below.

  • Open Firefox. Click on KeeFox and go to Options. In the KeePass tab, enter /usr/lib/keepass2 as KeePass location. The Mono location should already be filled in correctly.

  • Restart Firefox. Open the KeeFox Tutorial webpage. Follow the steps there and it shows you how to pull a login-password from KeePass to fill web forms, how to create and update a new password or add a new entry to the database.

Note: After going through these steps I realized that it is far easier to manually use KeePass instead of KeeFox. This is because login-passwords need only be entered once and can be saved for all future logins in Firefox using its built-in password manager anyway.

Tried with: KeeFox 1.5.3, Firefox 42, KeePass 2.25 and Ubuntu 14.04

Firefox does not scroll when selecting text


I run into so many small, but irritating problems in UI of programs that I wonder if I am the only one affected by them! Here is another one that took a while to figure out.

Someone had sent me a long email that was many pages long. I had it open in Gmail in Firefox. I needed to copy a large portion of this email and paste it into another document.

Ctrl + A to Select All was not a solution since that selects all the text being displayed, including sections of the Gmail UI. A common solution in this situation it to put the mouse cursor at the start of the text, press down the Left button, drag mouse down until it hits the screen bottom and keep dragging until I reach end of the text I want. This highlights and selects the text portion I want and I can now right-click and choose Copy or press Ctrl + c to copy it.

The strange problem was that, this did not work! Keeping Left mouse button pressed I could drag until screen bottom, but the page would not scroll up allowing me to choose the rest of the text!


It turns out that this happens only in Firefox on Ubuntu. It will only happen when Firefox is shown in a maximized or fullscreen window.

What is happening is that when the mouse cursor is dragged to hit the screen bottom, something in Firefox UI is not indicating that the cursor is trying to move out of the window. Thus, the webpage is not scrolling.

Turns out that this is a known bug, reported here in 2011. Four years on, a good solution is still being debated on.

Until it is fixed, the solution is simple: unmaximize or restore your Firefox window so that it is not fullscreen or maximized. Now try the copy operation, the webpage will scroll and it will work! Voila!

Tried with: Firefox 42 and Ubuntu 14.04

RefControl extension for Firefox

RefControl is an extension for Firefox that can be used to set the value of referer field sent to HTTP servers for certain webpages. This extension is similar to the Referer Control extension for Chrome.

You can change the referer directly in the extension preferences. A more friendly method is to visit the webpage and then click on this extension’s icon and choose RefControl options for this site to set for this specific website. The changes will take effect only if you start browsing from a new tab or might require a restart of Firefox.

More details on the usage of this extension from its author can be found here.

Tried with: RefControl, Firefox 41 and Ubuntu 14.04

Live HTTP Headers extension for Firefox

Live HTTP Headers is an extension for Firefox that can be used to view the HTTP headers sent and received when a webpage is loaded. This is useful, for example, to determine what the values in certain header fields are.

Installation requires a reboot. After that, click on the extension icon to open its recording window. Visit the webpage you want to monitor and you can see the HTTP headers logged in this extension window. You can save all the headers to a text file to analyze them.

Tried with: Live HTTP Headers 0.17.1, Firefox 41 and Ubuntu 14.04