This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Chromium

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Chromium is the open source version of Google's Chrome web browser. It features a minimal user interface, powerful web development tools, and a built in task manager. The Chromium Project is at the forefront of implementing new web standards.

Because Chromium is open source it is legally unable to include several features that the proprietary Google Chrome browser includes by default. Namely automatic updates and the integration of Adobe's Flash Player. A complete list of the differences can be found in the chromium repository.

Installation

USE flags

Linguas

There are many linguas available via USE_EXPAND in Chromium. So many, in fact, that the Wiki cannot display all of them. For a full list of linguas run:

user $equery u www-client/chromium | grep linguas
Note
The equery tools comes as part of the app-portage/gentoolkit package. It will need to be installed in order to use the above command.

Miscellaneous

USE flags for www-client/chromium Open-source version of Google Chrome web browser

+X Add support for X11
+hangouts Enable support for Google Hangouts features such as screen sharing
+official Enable Official build instead of Developer build.
+proprietary-codecs Enable codecs for patent-encumbered audio and video formats.
+screencast Enable support for remote desktop and screen cast using PipeWire
+system-harfbuzz Use system media-libs/harfbuzz instead of the bundled library.
+system-icu Use system dev-libs/icu instead of the bundled one
+system-png Use system media-libs/libpng instead of the bundled library
+system-toolchain Use system toolchain instead of the bundled one (if possible)
+system-zstd Use system app-arch/zstd instead of the bundled one.
+vaapi Enable Video Acceleration API for hardware decoding
+wayland Enable dev-libs/wayland backend
+widevine Unsupported closed-source DRM capability (required by Netflix VOD)
bindist Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
cups Add support for CUPS (Common Unix Printing System)
custom-cflags Build with user-specified CFLAGS (unsupported)
debug Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.
ffmpeg-chromium (binpkg only) Use Chromium FFmpeg fork (media-video/ffmpeg-chromium) rather than mainline FFmpeg (media-video/ffmpeg)
gtk4 Build with GTK4 headers.
headless Build Ozone only with headless backend, NOT RECOMMENDED for general use.
kerberos Add kerberos support
pax-kernel Allow building on a PaX-enabled kernel
pgo Build with Profile Guided Optimizations (2-stage compilation)
pulseaudio Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
qt5 Add support for the Qt 5 application and UI framework
qt6 Add support for the Qt 6 application and UI framework
selinux  !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

icu USE flag

Important
To avoid an emerge slot conflict with dev-libs/libxml2, which prevents Chromium to be emerged, icu USE flag must be set in /etc/portage/make.conf. If icu is newly set, update the system before emerging Chromium by issuing:

root #emerge --ask --update --deep --newuse @world

Emerge

Tip
Be aware that compiling Chromium can take a significant amount of real time, CPU time, and system memory. It is probably not a good idea to build Chromium when the system is under heavy load.

After setting USE flags as desired, emerge Chromium with the following command:

root #emerge --ask www-client/chromium

Configuration

HiDPI

Chromium's visual output is generally disconnected from a Desktop environment's DPI scaling. It can be instructed to start in a scaled mode by using the --force-device-scale-factor command-line option. This option can be passed a integer or decimal value. Standard scaling begins at 1.0. For example, to make Chromium's UI 1.5x larger:

user $chromium --force-device-scale-factor=1.5

A full list of command-line switches can be found here.

Usage

Chrome URLs

Much like Firefox, Chromium has many internal Chrome URLs (special pages) that are used for additional configuration, troubleshooting, task management, etc. An exhaustive list of special pages can be accessed by navigating to: chrome://about/

Prominent special pages include:

  • chrome://components/ - Shows enabled components and provides a button to check for updates for each of them. It is sometimes necessary to manually update the PPAPI Adobe flash module via this interfaces when using Chrome.
  • chrome://chrome/ - Displays the About page which includes version information.
  • chrome://extensions/ - A page to manage extensions.
  • chrome://flags/ - Enable/disable experimental features.
  • chrome://flash/ - Displays special information about the Adobe Flash Player (if it is accessible by Chromium).
  • chrome://history/ - Displays web history. Also accessible through the sandwich menu or by pressing Ctrl+h.
  • chrome://memory-redirect/ - Measure the memory usage of the browser and per-tab usage.
  • chrome://net-internals/ - Lots of information on network connections.
  • chrome://plugins/ - Shows a list of plugins. Enable/disable them from this interface. (Deprecated in Chrome version 57[1].)
  • chrome://version/ - Displays more version information than the chrome page.

Troubleshooting

Adobe Flash not working?

Because Adobe Flash has a proprietary license, Chromium is not able to include flash as part of the source code package. One must install Adobe Flash Player manually. Installing www-plugins/adobe-flash should get Adobe Flash Player working in Chromium.

root #emerge --ask www-plugins/adobe-flash
Warning
As mentioned above a proprietary license must be accepted in order to use Adobe Flash. Since the source code is not open, this software could easily open the system to security holes and corporate or government eavesdropping. Be aware of this and proceed with caution!

Tabs crash

Occasionally tabs in Chromium crash. This can be caused by quite a few things, however one of the most common reason for occurrence is that the system is running low on memory. On Gentoo, this can especially happen if the system is compiling a www-client/chromium package update while running Chromium.

The free command can be used to see how much memory is available on the system:

user $free -h
              total        used        free      shared  buff/cache   available
Mem:            15G         11G        735M        789M        3.4G        3.1G

The solution to is to free up memory until the large package compiles have finished. Open a resource monitor of choice and kill applications using large amounts of memory.

See also

  • Firefox — Mozilla's solution to the web browser.
  • Chrome — Google's proprietary (closed source) web browser.

References