Web browsers for a testing workstation

Installing and configuring some web browsers on our example Debian testing workstation/desktop machine

Author: Francesco Poli
Contact: invernomuto@paranoici.org
Version: 0.44
Copyright: Expat license
Notice:

Copyright (c) 2007-2024 Francesco Poli

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About this document
Web form HyperText Markup Language
Source form reStructuredText
Web stylesheet Cascading StyleSheets
Build directives Makefile

Contents

Summary of previous episodes

In another document (HTML, reST) you saw how to configure e-mail handling on our example Debian testing workstation/desktop box. Now it's time to install and configure some web browsers.

Graphical web browsers

You probably want to install at least one graphical web browser.

Firefox

Install the package:

# aptitude install firefox-esr

This browser may be configured for your regular user, in order to meet your needs:

$ firefox

Right click on the Toolbar and enable the Menu Bar, but not the Bookmarks Toolbar (Only Show on New Tab).

First of all, select Add-ons and Themes from the Tools menu. In the Themes section, enable the Light theme.

Select Settings from the Edit menu. In the "General" section, check "Open previous windows and tabs", uncheck "Always check if Firefox is your default browser", uncheck "Ctrl+Tab cycles through tabs in recently used order", check "Open links in tabs instead of new windows", uncheck "When you open a link in a new tab, switch to it immediately", uncheck "Confirm before closing multiple tabs", check "Confirm before quitting with Ctrl+Q"; select "Automatic" website appearance, select Default font "sans-serif", size "16", then click on the "Advanced..." button and choose fonts for "Latin" (Proportional "Sans Serif", Size "16", Serif "serif", Sans-serif "sans-serif", Monospace "monospace", Size "12", Minimum font size "9", check "Allow pages to choose their own fonts, instead of your selections above"); click on the "Manage Colors..." button and configure colors (leave default colors for black Text, white Background, blue Unvisited Links, and violet Visited Links, uncheck "Use system colors", check "Underline links", and select override colors "Only with High Contrast themes"), select Default zoom "100 %", uncheck "Zoom text only", select language "English (United States)" and click on the "Choose..." button and configure languages (en-us, en, it), uncheck "Use your operating system settings for English (United States, posix) to format dates, times, numbers, and measurements", uncheck "Check your spelling as you type"; choose Save files to "Downloads", uncheck "Always ask you where to save files", leave all the applications entries as they are, except for mailto, where you may select "Use other...", click on the "Type a file name" button (if needed), and enter "/usr/bin/xdg-email", select "Save files" with other files, uncheck "Play DRM-controlled content"; check "Use recommended performance settings"; check "Use autoscrolling", check "Use smooth scrolling", uncheck "Always show scrollbars", uncheck "Always use the cursor keys to navigate within pages", uncheck "Search for text when you start typing", check "Enable picture-in-picture video controls", check "Control media via keyboard, headset, or virtual interface", uncheck "Recommend extensions as you browse", uncheck "Recommend features as you browse"; click on the Network Settings "Settings..." button and choose "Use system proxy settings".

In the "Home" section, select Homepage and new windows "Blank Page", select New tabs "Blank Page", in Firefox Home Content check "Web Search", uncheck "Shortcuts", uncheck "Recent activity", uncheck "Snippets".

In the "Search" section, choose "Add search bar in the toolbar"; select "DuckDuckGo" as Default Search Engine, uncheck "Provide search suggestions", and uncheck all alternative search engines (except "DuckDuckGo", of course!).

In the "Privacy & Security" section, choose "Custom" Enhanced Tracking Protection, and check "Cookies" selecting "All cross-site cookies (may cause websites to break)", check "Tracking content" selecting "In all windows", check "Cryptominers", check "Fingerprinters", choose Send websites a Do Not Track signal "Always", check "Delete cookies and site data when Firefox is closed", uncheck "Ask to save logins and passwords for websites", check "Show alerts about passwords for breached websites", uncheck "Use a Primary Password"; select Firefox will "Use custom settings for history", uncheck "Always use private browsing mode", check "Remember browsing and download history", check "Remember search and form history", check "Clear history when Firefox closes", and click on the "Settings..." button (When closed, Firefox should automatically clear all: uncheck "Browsing & Download History", check "Cookies", check "Active Logins", check "Cache", uncheck "Form & Search History", uncheck "Site settings", uncheck "Offline website data"), uncheck "Browsing history", uncheck "Bookmarks", uncheck "Open tabs", uncheck "Shortcuts", uncheck "Search engines" when using the address bar; check "Block pop-up windows" (you can add exceptions for specific websites, if needed), check "Warn you when websites try to install add-ons" (remove all the exceptions, if any); uncheck "Allow Firefox to send technical and interaction data to Mozilla", uncheck "Allow Firefox to install and run studies" (these two settings should already be disabled in the Debian package), uncheck "Allow Firefox to send backlogged crash reports on your behalf"; uncheck "Block dangerous and deceptive content", check "Query OCSP responder servers to confirm the current validity of certificates", choose "Enable HTTPS-Only Mode in all windows", choose secure DNS "Default Protection".

In the "Sync" section, don't do anything.

From the View menu, Toolbars entry, leave Menu Bar checked, but not Bookmarks Toolbar (Only Show on New Tab). From the View menu, Sidebar entry, check Bookmarks and adjust the horizontal size of the sidebar; leave History and Synced Tabs unchecked.

From the Bookmarks menu click on "Manage Bookmarks": You can import bookmarks previously exported from another browser in HTML format, by using the "Import and Backup" menu of the dialog window.

Enable the use of installed icon fonts (from package fonts-octicons) by creating the following file:

$ cat .mozilla/firefox/*.default/chrome/userContent.css
@font-face
{
    font-family: 'octicons';
    src: local('Octicons');
}

After that, visit about:config? and set toolkit.legacyUserProfileCustomizations.stylesheets to true.

In order to easily manage the Javascript interpreter, install the following extension:

# aptitude install webext-noscript

After restarting the browser for your regular user, customize the behavior of the NoScript extension, by clicking on its "Preferences" button (in the Extensions section of the Add-ons Manager). In the General tab, uncheck "Disable restrictions globally (dangerous)", uncheck "Temporarily set top-level sites to TRUSTED"; check the following preset customizations: DEFAULT allows frame and webgl, TRUSTED allows all, UNTRUSTED disallows all. In the Appearance tab, check "Show NoScript contextual menu item", check "Display blocked items count badge", uncheck "List full addresses in the permissions popup", uncheck "High contrast appearance". In the Advanced tab, check "Sanitize cross-site suspicious requests (XSS FAQ...)", uncheck "Debug".

In order to easily querying Debian-related pages, install the following extension:

# aptitude install webext-debianbuttons

After restarting the browser for your regular user, click on the Extensions button in your navigation toolbar and click on "pin to the toolbar" for the Debian queries extension. Then, customize your navigation toolbar, by selecting Customize... from the View menu, Toolbars entry. Drag the Debian button within the navigation toolbar (move it just after the home button).

If you want Firefox to be your default web browser, you can add the following two lines to your ~/.bashrc:

$ grep -i browser ~/.bashrc
# set a sensible browser
export BROWSER="firefox"

This way, a new Firefox tab will be opened whenever some other application invokes the sensible-browser command on a URI.

Moreover, you may want to elect Firefox as your default viewer for (X)HTML and XML documents and as your default handler for the HTTP(S) protocol. First of all, install the following package (if it is not already installed):

# aptitude install xdg-utils

Then, issue the following command:

$ xdg-mime default firefox-esr.desktop \
   text/html text/xml application/xhtml+xml application/xml \
   application/vnd.mozilla.xul+xml application/rss+xml application/rdf+xml \
   x-scheme-handler/http x-scheme-handler/https

Chromium

Install the package:

# aptitude install chromium avahi-utils_

Now configure the browser for your regular user:

$ chromium

Click on the "Customize and control Chromium" button and select Settings from the drop down menu. In the "Privacy and security" section, make sure third-party cookies are blocked. In the "Appearance" section, choose "New Tab page" as home page and enable "Show home button". In the "Search engine" section, choose "DuckDuckGo" as search engine used in the address bar. In the "On startup" section, choose "Open the New Tab page". In the "Languages" section, set "1. English (United States), 2. English, 3. Italian" as languages, disable spell check and Google Translate. In the "System" section, disable "Continue running background apps when Chromium is closed", enable "Use graphics acceleration when available".

Text-based web browsers

Having text-based web browsers handy is useful for various reasons.

w3m

Install the package:

# aptitude install w3m-img

Conclusions

Now you can surf the web as you like. Next step is (re-)learning a good practice: it's backup time! More details in a separate document (HTML, reST).