> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/ask/flat/chapter-11-multimedia-and-external-devices/di-11.9-jie-web-liu-lan-qi.md).

# 11.9 Web Browsers

This section describes how to install and configure some mainstream web browsers on a FreeBSD system.

## Firefox

Firefox is an open-source browser with features such as standards-compliant HTML rendering engine, tabbed browsing, pop-up window blocking, extension functionality, and enhanced security. Firefox is based on the Mozilla codebase.

### Installing the Latest Version of Firefox

* Install using pkg:

```sh
# pkg install firefox
```

* Or using Ports:

```sh
# cd /usr/ports/www/firefox/
# make install clean
```

![Firefox Browser](/files/3lS1AAApdxSlH9lOWo8c)

### Installing Firefox Extended Support Release (ESR)

* Install using pkg:

```sh
# pkg install firefox-esr
```

* Or using Ports:

```sh
# cd /usr/ports/www/firefox-esr/
# make install clean
```

## Chromium

Chromium is an open-source browser project that aims to provide a safer, faster, and more stable web browsing experience. Chromium features tabbed browsing, pop-up window blocking, extension support, and more. Chromium is the open-source foundation of the Google Chrome browser.

Chromium differs from Chrome, but in FreeBSD the startup command for Chromium is `chrome`.

* Install Chromium using pkg

```sh
# pkg install chromium
```

* Or install Chromium using Ports

```sh
# cd /usr/ports/www/chromium/
# make install clean
```

> **Warning**
>
> Compiling Chromium requires at least 8 GB of memory (Release build), or an equivalent sum of swap partition and memory. If LTO optimization is enabled, 16 GB is required; if Debug build is enabled, 32 GB is required. Chromium only supports amd64 and aarch64 architectures.

## ungoogled-chromium

Chromium still retains dependencies on Google web services and binaries, so the ungoogled-chromium project removes all Google-related components, including background requests, domain tracking, and precompiled binaries.

* Install ungoogled-chromium using pkg

```sh
# pkg install ungoogled-chromium
```

* Or install ungoogled-chromium using Ports

```sh
# cd /usr/ports/www/ungoogled-chromium/
# make install clean
```

## Chrome (Linux Compatibility Layer)

Chrome (Linux Compatibility Layer) runs on FreeBSD's Linuxulator and requires first enabling the Linux binary compatibility layer.

* Install Chrome using pkg

```sh
# pkg install linux-chrome
```

* Or install Chrome using Ports

```sh
# cd /usr/ports/www/linux-chrome/
# make install clean
```

## Appendix: Enabling Chromium to Use Google Account Sync

As an open-source project, the relationship between Chromium and Google Chrome is similar to that between AOSP and Pixel UI. Chromium cannot directly download and install extensions from the Google Chrome online extension store; it can only manually install crx files locally (after sync is enabled, browser extensions can be automatically synced). Chromium also does not come with Google Translate extension and other features. For more differences, see: The Chromium Project. Chromium Browser vs Google Chrome\[EB/OL]. \[2026-03-26]. <https://chromium.googlesource.com/chromium/src/+/main/docs/chromium_browser_vs_google_chrome.md>. This document compares the differences between Chromium and Google Chrome in terms of functionality and licensing.

`Chromium` is not `Google Chrome`; the former is open-source and free software published by The Chromium Project, with its top-level license being the [BSD 3-Clause "New" or "Revised" License](https://github.com/chromium/chromium/blob/main/LICENSE), and also includes code licensed under LGPL 2.1, MPL 1.1, and others; the latter is proprietary software by Google LLC.

Around the release of [Chromium 89](https://archlinux.org/news/chromium-losing-sync-support-in-early-march/), Google restricted access to the private sync API, and distributions consequently removed the default API keys that were previously bundled with Chrome. The announcement explains the reasons and impact of this change.

Before starting to obtain the token, you need to join the following two Google mailing lists:

* [Google browser sign-in test account](https://groups.google.com/u/0/a/chromium.org/g/google-browser-signin-testaccounts)
* [Chromium-dev](https://groups.google.com/a/chromium.org/g/chromium-dev)

![Join Mailing List](/files/aRgOWlqsdvzGwKMHexw3)

Since only access to the Chrome Google API is needed, you must turn off message notifications for both mailing lists (i.e., "No email"), otherwise you will receive a large number of email notifications.

![Disable Email Notifications](/files/Qh1M6creBYFtiCKg5Wn5)

![Mailing List Settings](/files/YjO8tnxjLSmj3uYMubt2)

After joining the Google browser sign-in test account group, you may see messages such as "You do not have access to this content." This is normal and no cause for concern.

![join-mail-list-for-google-api-error2](/files/a8oy5IJIenZCjPwA6YcU)

Open the [Google Cloud Console website](https://console.cloud.google.com/) in your browser.

> **Note**
>
> The Google account used to log in to the console must be the same as the account that joined the mailing lists earlier.

![Google Cloud Console Homepage](/files/eeW12W23KvmLlK5JXNYK)

Click "My First Project" in the top left corner, then select "New Project" in the upper right of the pop-up window.

![New Project Option](/files/twAVWNqnBrKY8FEJ8XtY)

The project name can be filled in as desired, and the organization should be kept at the default setting.

![Fill in Project Information](/files/ewceej7PNQzzi2gxqV9d)

Click "My First Project" in the top left corner, then select the project just created (here, google-sync) in the pop-up window.

![Select Project](/files/FP7R0BprAc2u71xnvwQb)

Click "APIs & Services" in the image above, then click "+ ENABLE APIS AND SERVICES"

![Enable APIs and Services](/files/Ipu4GHmlDR6gw8qATjIR)

Search for "chrome-sync" to find the following content.

![Search Chrome Sync](/files/IOUoA6nmXeZvmPRKRxDy)

Click to enable "Chrome Sync API"

![Enable Chrome Sync API](/files/4dbUoUh2X1IvlrHvOMzS)

After that, the following status will be displayed in the enabled APIs and services list

![Enabled API List](/files/2J0azNeNoZqvej1zhhId)

Select "OAuth consent screen":

![OAuth Consent Screen](/files/7eImbC6KtmaMHMUxBohS)

Create an external application:

![Create External Application](/files/E4Q41qwReh9gDuGls9FK)

![Fill in Application Information](/files/GIFuW4zQ67fEELr3qr1Z)

![Application Information Form](/files/xm0bkbt68azu8HJyKVnh)

![Application Details](/files/hDIokDOLXHDlq7owT9ke)

After creation, as shown:

![Application Created](/files/7wZ4khpNvs6NvZPkEnPG)

Click "Clients" to create an OAuth client ID, with the application type as "Desktop app":

![Create OAuth Client](/files/I7wcVtBNJ1anH0rVvfn8)

After creation, as shown:

![OAuth Client Created](/files/tsV3gWUvXcOuyuyeZUme)

Click the created "Desktop client 1"

![View Client Details](/files/PC5ElxzPIQkOfkjgv6pj)

Obtain the following credentials (this is an example; you must generate your own):

* Client ID `502882456359-okloi0a7k6vjodss69so97tmqmv0jjj5.apps.googleusercontent.com`
* Client Secret `GoCSPX-iKHEKZmP4w_zdq0Z8nwOqz6SF2_M`

Return to "APIs & Services", click "+ CREATE CREDENTIALS", then click "API Key".

![Create API Key](/files/agrVWM7ZNYIqvvZVWm6x)

You will then obtain an API key (this is an example; readers must generate their own): `AIzaSyDVpYvJQUn9HTjAiD89y3xBDOG3oaxV5_E`

![API Key Generated](/files/HGxyVvxVojVyqWenMVkb)

Open the credentials overview:

![Credentials Overview](/files/zdJMFzTxbYCztE7ZWP1h)

Edit the **\~/.profile** file and add:

```sh
export GOOGLE_API_KEY=AIzaSyDVpYvJQUn9HTjAiD89y3xBDOG3oaxV5_E  # Fill in the API key
export GOOGLE_DEFAULT_CLIENT_ID=502882456359-okloi0a7k6vjodss69so97tmqmv0jjj5.apps.googleusercontent.com  # Fill in the Client ID
export GOOGLE_DEFAULT_CLIENT_SECRET=GoCSPX-iKHEKZmP4w_zdq0Z8nwOqz6SF2_M  # Fill in the Client Secret
```

> **Note**
>
> This section has only been tested with the default shell sh and KDE 6. Feedback on configurations in other environments is welcome.

Restart the system, then launch Chromium.

Click "Turn on sync":

![Turn on Sync](/files/GslxcOhUHEdKe1jZjTfL)

Enter the account:

![Enter Account](/files/QrsVMuz9Fj0visI5hyfL)

Enter the account password:

![Enter Password](/files/0GufWe4wUB8BeCmEvil3)

![Login Confirmation](/files/EPRYXeAYdHprFDLfAu6W)

Check the sync status:

![Sync Status](/files/S4SGp5BMoGvISEZjTzOs)

### References

* LearningToPi. Chromium Sync - Learning to Pi\[EB/OL]. \[2026-03-25]. <https://www.learningtopi.com/sbc/chromium-sync>. This tutorial provides detailed steps for configuring Chromium sync functionality.
* Ling Wan. Restoring Login Functionality for Chromium\[EB/OL]. \[2026-03-25]. <https://nyac.at/posts/google-sync-in-chromium>. This article provides a method for restoring Google account login in Chromium.

## Troubleshooting and Outstanding Issues

### Mitigating Chromium Excessive Disk Cache and GPU Acceleration Issues

Add the parameters to the launch icon (which is essentially a text file):

```sh
chrome --disk-cache-size=0 --disable-gpu
```

> **Note**
>
> `--disk-cache-size=0` does not disable disk cache, but rather lets Chromium use the default calculated value. To limit the cache size, specify the exact number of bytes (e.g., `--disk-cache-size=104857600` for 100 MB). `--disable-gpu` is used to disable GPU hardware acceleration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.bsdcn.org/ask/flat/chapter-11-multimedia-and-external-devices/di-11.9-jie-web-liu-lan-qi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
