Setting up Firefox on a new system

A number of configuration changes to Firefox are necessary on a new system before it is efficient and convenient to use. This post has step-by-step instructions for how I set up Firefox from scratch.

The steps

Remember the open tabs

You do not want to lose the state that is the current set of tabs open in Firefox.

In old Firefox speak, it is “restore session”.

Change it in the hamburger menu (upper right) → “Settings” → “General” (left panel) → section “Startup” (the first section) → check “Open previous windows and tabs”.

Make Ctrl + Tab behave the normal way

That is, just a simple move of the current tab to the right. Similar for Shift + Ctrl + Tab (to the left). This is the desired behaviour, incl. consistency with other applications (e.g., Geany) and with macro keyboards to support this very, very common operation without the need to use modifier keys.

Change it in the hamburger menu (upper right) → “Settings” → “General” (left panel) → section “Tab” (the second section) → uncheck “Ctrl+Tab cycles through tabs in recently used order”.

Make Firefox ask for a download location

Instead of placing it in some hard-to-locate download folder.

Change it in the hamburger menu (upper right) → “Settings” → “General” (left panel) → section “Files and Applications” (about 40% down) → check “Always ask you where to save files”.

Enable keyboard navigation of links on a page

So that we can avoid using the mouse. Ideal would be navigation with the arrow keys, like in Opera, but this is almost as good:

Jump to links that start with the typed letters. Usually only one or two keystrokes are unique enough to get to the destination. The link can then be opened by pressing Enter (or Shift + Ctrl + Enter to open in a new tab).

Setup:

  1. Hamburger menu (upper right) → SettingsGeneral. Under headline Browsing (scroll 80% down) → Search for text when I start typing. Turn this option on.
  2. Set option to only go to links; in the address bar enter

    about:config

    followed by Enter. Then: press Accept the Risk and Continue!, find the line accessibility.typeaheadfind.linksonly (e.g., by pasting in “linksonly” to the search field), select the “toggle” icon (e.g., by TABing to it) and change the value to True by hitting Enter.

  3. Optional (will make matching during typing more specific): Turn off case-sensitivity. Set accessibility.typeaheadfind.casesensitive to 0 (same procedure as for accessibility.typeaheadfind.linksonly, see above. When Enter is pressed, a dialog box will appear with the current value. Type 0 and press Enter).

Courtesy Firefox: non-Vimperator way to do mouseless browsing? by the undersigned.

Make the visited link indication on pages distinct

By default, Firefox has way too low contrast to clearly see if a link has been visited or not (e.g., changing from one shade of blue to a slightly different shade of blue). It doesn’t work well on sites with dark mode either. An orange-red colour works reasonably well on both sites with a light background and a dark mode.

Setup:

  1. Open the folder for the current Firefox profile: about:profiles in the address bar (e.g., Ctrl + T, Ctrl + V, Enter) → for the row “Root Directory” for the currently active profile (often the name is “default-release” or “default”), press “Open Directory” or “Open Folder” on the right. Samples: /home/mortensen/.mozilla/firefox/moi8yf2e.default (on Linux) and C:\Users\embo\AppData\Roaming\Mozilla\Firefox\Profiles\0l94bqdj.default-release (on Windows).
  2. Open folder “chrome” (no, this has nothing to do with the Google Chrome web browser). If the folder does not exist already, create it.
  3. Edit (or create if it is not there) the file userContent.css.
  4. Add this line:
    a:visited { color:OrangeRed!important; }
  5. In the address bar, enter

    about:config

    followed by Enter. Then: press Accept the Risk and Continue!, find the line toolkit.legacyUserProfileCustomizations.stylesheet (e.g., by pasting in “legacyUserProfileCustomizations” to the search field). Select the “toggle” icon (e.g., by TABing to it) and change the value to True by hitting Enter.

  6. In most cases Firefox has to be restarted before it takes effect.

Note: Similarly, we can also set the colour for unvisited links. See appendix A for details. Though it works fine with only changing the visited link colour.

Courtesy How can I change link colors in Firefox and Chrome, but leave all other colors and fonts as they are? by terdon.

Block all JavaScript content by default (for security reasons)

Install NoScript:

  1. Download the .xpi file from the download page. Sample direct download URL.
  2. Install it by menu “File”“Open File…” → find and select the downloaded .xpi file (e.g. “noscript-11.4.6.xpi”) → press “Open” → press “Add” → press “Okay”.

Allow some JavaScript content

For full use of Stack Exchange (two sites), it is:

  • stackoverflow.com
  • superuser.com
  • sstatic.net

It is in order to be able to vote, e.g. on comments, and other operations.

It is easiest to open these two pages and then change the setting for the three domains to “Trusted” by clicking on the NoScript icon in the upper right, etc:

(I don’t know of a keyboard shortcut to do it. Some older versions of NoScript allowed this, but despite what the documentation says it is not possible with the version that was introduced with Firefox Quantum. In other words, current versions of NoScript unfortunately forces one to use the mouse.)

Bookmark the jump page

Open and bookmark the jump page: Open menu “Bookmarks” (Alt + B) → “Bookmark Current Tab”. Or Ctrl + D.

The bookmark will initially be misplaced. Open menu “Bookmarks” (Alt + B) → “Manage bookmarks”. Move the new bookmark to “Bookmarks Menu” (for example, from “Bookmarks Toolbar”).

Test the keyboard shortcut to it: Alt + B, J

Log into Stack Exchange

For example, into Stack Overflow.

Appendix A: How can I change link colors in Firefox and Chrome, but leave all other colors and fonts as they are?

Firefox

Linux

Windows

Common for Linux and Windows

Chrome

Courtesy How can I change link colors in Firefox and Chrome, but leave all other colors and fonts as they are? by terdon.

Leave a Reply

Your email address will not be published. Required fields are marked *

*