Difference between revisions of "Chromium"

From ArchWiki
Jump to: navigation, search
m (WebGL)
m (Installation: section was removed in https://wiki.archlinux.org/index.php?title=GTK%2B&diff=499543&oldid=498684)
 
(230 intermediate revisions by 61 users not shown)
Line 1: Line 1:
 +
[[Category:Web browser]]
 
[[de:Chromium]]
 
[[de:Chromium]]
 
[[es:Chromium]]
 
[[es:Chromium]]
 
[[fr:chromium]]
 
[[fr:chromium]]
 
[[it:Chromium]]
 
[[it:Chromium]]
[[zh-CN:Chromium]]
+
[[ja:Chromium]]
[[Category:Web Browser]]
+
[[ru:Chromium]]
 +
[[zh-hans:Chromium]]
 
{{Related articles start}}
 
{{Related articles start}}
{{Related|Chromium Tips and Tweaks}}
+
{{Related|Chromium/Tips and tricks}}
{{Related|Browser Plugins}}
+
{{Related|Browser plugins}}
 
{{Related|Firefox}}
 
{{Related|Firefox}}
 
{{Related|Opera}}
 
{{Related|Opera}}
 
{{Related articles end}}
 
{{Related articles end}}
  
[[Wikipedia:Chromium (web browser)|Chromium]] is an open source graphical web browser from Google, based on the [[Wikipedia:WebKit|WebKit]] rendering engine.
+
[[Wikipedia:Chromium (web browser)|Chromium]] is an open-source graphical web browser based on the [[Wikipedia:Blink (web engine)|Blink]] rendering engine. It is the basis for the proprietary Google Chrome browser.
  
 
== Installation ==
 
== Installation ==
  
The open source project, '''Chromium''', can be [[Pacman|installed]] with the package {{Pkg|chromium}}, available in the [[official repositories]].  
+
The open-source project, '''Chromium''', can be [[install]]ed with the {{Pkg|chromium}} package.
In the [[AUR]] you can also find:
 
* {{AUR|chromium-dev}} - the development version (beware: compiling Chromium takes at least as long as compiling the Linux kernel!)
 
* {{AUR|chromium-browser-bin}} - the binary version of the latest Chromium build
 
  
The modified browser, '''Google Chrome''', bundled with Flash Player and PDF Reader, can be installed with the package {{AUR|google-chrome}}, available in the [[AUR]].
+
Other alternatives include:
In the [[AUR]] you can also find:
 
* {{AUR|google-chrome-beta}} - the beta version
 
* {{AUR|google-chrome-dev}} - the development version
 
  
{{Tip|See these [https://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome two] [http://news.softpedia.com/news/Google-Chrome-vs-Chromium-Understanding-Stable-Beta-Dev-Releases-and-Version-No-140060.shtml articles] for an explanation of the differences between Stable/Beta/Dev, as well as Chromium vs. Chrome and the version numbers.}}
+
* {{App|Chromium Beta Channel|the beta version|https://googlechromereleases.blogspot.com/|{{AUR?|chromium-beta}}}}
 +
* {{App|Chromium Dev Channel|the development version|https://googlechromereleases.blogspot.com/|{{AUR|chromium-dev}}}}
 +
* {{App|Chromium snapshot builds|the untested nightly version|https://build.chromium.org/|{{AUR|chromium-snapshot-bin}}}}
 +
* {{App|Chromium with [[VA-API]] support|with a patch to enable VA-API|https://chromium-review.googlesource.com/c/chromium/src/+/532294|{{AUR|chromium-vaapi}}}}
  
[http://www.srware.net/en/software_srware_iron.php SRWare Iron], a modified Chromium with altered settings to increase privacy and with built-in ad-blocker, can be installed with the package {{AUR|iron-bin}}, available in the [[AUR]].
+
The derived browser, '''Google Chrome''', which automatically installs Flash Player and Widevine [[Wikipedia:Encrypted Media Extensions|EME]] (for e.g. Netflix), can be [[install]]ed with the {{AUR|google-chrome}} package.
  
== Configuration ==
+
Other alternatives include:
  
=== Set Chromium as default browser ===
+
* {{App|Google Chrome Beta Channel|the beta version|https://www.google.com/chrome/browser/beta.html|{{AUR|google-chrome-beta}}}}
 +
* {{App|Google Chrome Dev Channel|the development version|https://www.google.com/chrome/browser/|{{AUR|google-chrome-dev}}}}
  
This behaviour is related to [[xdg-open]]: see [[xdg-open#set the default browser]]. For more information about the topic in general, see [[Default Applications]].
+
{{Note|Support for native client (NaCl) has been dropped in {{pkg|chromium}} version 54, see {{Bug|51511}}. Opening NaCl applications will display this error message: "This plugin is not supported". The {{aur|google-chrome}} package supports NaCl.}}
  
=== File associations ===
+
See these [https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md two] [https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/ articles] for an explanation of the differences between Chromium and Chrome.
  
This behaviour is related to [[xdg-open]]: see [[xdg-open#Configuration]]. For more information about the topic in general, see [[Default Applications]].
+
On top of the different Chromium build channels, a number of forks exist with more or less special features; see [[List of applications#Blink-based]].
  
=== Font rendering ===
+
== Configuration ==
  
Chromium (and Google Chrome) will use the [[Font Configuration|settings]] in {{ic|~/.config/fontconfig/fonts.conf}}. For possibly better rendering you may try the following. Create the file if it does not already exist.
+
=== Default applications ===
  
{{hc|~/.config/fontconfig/fonts.conf|
+
To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see [[default applications]].
<match target&#61;"font">
 
  <edit mode&#61;"assign" name&#61;"autohint"><bool>true</bool></edit>
 
  <edit mode&#61;"assign" name&#61;"hinting"><bool>true</bool></edit>
 
  <edit mode&#61;"assign" name&#61;"hintstyle"><const>hintslight</const></edit>
 
</match>
 
}}
 
  
If the fonts are still rendered badly, you can use Xft settings [[X resources|as suggested here]]:
+
=== Flash Player plugin ===
{{hc|~/.Xresources|
 
[...]
 
! Xft settings ---------------------------------------------------------------
 
Xft.dpi:        96
 
Xft.antialias:  true
 
Xft.rgba:      rgb
 
Xft.hinting:    true
 
Xft.hintstyle:  hintslight
 
[...]
 
}}
 
 
 
Then update the X Resources database using:
 
 
 
$ xrdb -merge ~/.Xresources
 
 
 
{{Note|These settings will affect any application that uses X Resources for font settings; e.g. [[Rxvt-unicode|rxvt-unicode]].}}
 
 
 
==== Non-Latin characters ====
 
  
Install needed fonts to correctly display Chinese, Japanese, Korean characters. For examples of recommended fonts for various languages see [[Fonts#Font_packages|Font Packages]].
+
Flash Player is automatically installed when using Google Chrome.
  
For the Arch Wiki, one only needs the {{Pkg|ttf-arphic-uming}} package.
+
To install it for Chromium, [[install]] the {{Pkg|pepper-flash}} package.
  
=== Flash Player plugin ===
+
Make sure Flash is allowed to run in {{ic|chrome://settings/content/flash}}.
  
==== Adobe (Netscape plugin API) ====
+
=== Widevine Content Decryption Module plugin ===
{{Warning|This version will not be updated (except for security updates), and is stuck at version 11.2. It will be completely disabled in January 2014.[http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html]}}
 
The Adobe Flash plugin can be [[Pacman|installed]] with the package {{Pkg|flashplugin}}, available in the official repositories.
 
  
==== Adobe (Pepper plugin API) ====
+
Widevine is Google's Encrypted Media Extensions (EME) Content Decryption Module (CDM). It is used to watch premium video content such as Netflix. It is automatically installed when using Google Chrome.
  
While the classic Flash plugin will not be updated for Linux, an updated Flash Player is included with Google Chrome. It is compatible with Chromium and Iron.
+
To install it for Chromium, [[install]] the {{AUR|chromium-widevine}} package. Make sure ''Allow sites to play protected content'' is checked in {{ic|chrome://settings/content/protectedContent}}.
 
 
The easiest way to install '''pepper-flash''' for Chromium is using one of the packages provided in the [[AUR]]:
 
* {{AUR|chromium-pepper-flash-stable}} for the stable version.
 
* {{AUR|chromium-pepper-flash}} for a development version.
 
 
 
{{Note|
 
* If you have still {{pkg|flashplugin}} installed, in order for Chromium to use this new Pepper Flash plugin, please make sure the plugin location from {{ic|/usr/lib/mozilla/plugins/libflashplayer.so}} is disabled and {{ic|/usr/lib/PepperFlash/libpepflashplayer.so}} is enabled in {{ic|chrome://plugins}}.
 
* If you use [http://www.srware.net/en/software_srware_iron.php SRWare Iron], and have still {{pkg|flashplugin}} installed and if the Pepper Flash doesn't show up in the plugins list, then disable {{ic|libflashplayer.so}} and start Iron with:
 
{{bc|1=$ iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.9.900.117}}
 
}}
 
  
 
=== PDF viewer plugin ===
 
=== PDF viewer plugin ===
  
There are multiple ways of enabling PDF support in Chromium that are detailed below.
+
Chromium and Google Chrome are bundled with the ''Chromium PDF Viewer'' plugin. If you don't want to use this plugin, check ''Open PDFs using a different application'' in {{ic|chrome://settings/content/pdfDocuments}}.
  
==== libpdf ====
+
=== Certificates ===
  
'''libpdf''' is Google's own implementation of a PDF renderer included with Google Chrome. It is compatible with Chromium and Iron.
+
Chromium uses [[Network Security Services|NSS]] for certificate management. Certificates can be managed in {{ic|chrome://settings/certificates}}.
  
The easiest way to install '''libpdf''' for Chromium is using one of the packages provided in the [[AUR]]:
+
== Tips and tricks ==
* {{AUR|chromium-libpdf-stable}} for the stable version.
 
* {{AUR|chromium-libpdf}} for a development version.
 
  
Enable the plugin in {{ic|chrome://plugins}}.
+
See the main article: [[Chromium/Tips and tricks]].
  
{{Note|To install '''libpdf''' for other Chromium packages, edit the PKGBUILD of {{AUR|chromium-libpdf-stable}} to install {{ic|libpdf.so}} into correct path. For example, to install it for {{AUR|chromium-browser-bin}}, replace
+
== Troubleshooting ==
install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/usr/lib/chromium"''
 
with
 
install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/opt/chromium-browser"''
 
}}
 
  
===== Manual installation =====
+
=== Fonts ===
  
To do it manually, download a Google Chrome release that corresponds to the version of Chromium you use:
+
{{Note|Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the [https://dev.chromium.org/developers/linux-technical-faq Linux Technical FAQ].}}
  
$ curl -O https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_i386.deb
+
==== Font rendering issues in PDF plugin ====
$ curl -O https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
 
$ curl -O https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 
$ curl -O https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
 
  
Extract the deb file with:
+
To fix the font rendering in some PDFs one has to install the {{Pkg|ttf-liberation}} package, otherwise the substituted font causes text to run into other text. This was [https://code.google.com/p/chromium/issues/detail?id=369991 reported on the chromium bug tracker] by an Arch user.
$ ar vx ''deb-file''
 
  
Extract LZMA the archive with:
+
=== Force 3D acceleration ===
$ tar -xJf ''lzma-file''
 
  
Move {{ic|libpdf.so}} from {{ic|opt/google/chrome/}} to the appropriate directory as stated above. A change of its file permissions and ownership may be necessary (the permission of {{ic|libpdf.so}} should be 755).
+
{{Warning|Disabling the rendering blacklist may cause unstable behaviour, including crashes of the host. See the bug reports in {{ic|chrome://gpu}}.}}
  
To verify that the installation went correctly: start Chromium, open {{ic|chrome://plugins/}} and check  if "Chrome PDF Viewer" is available (it may need to be enabled).
+
First follow [[Hardware video acceleration]]. Then, to force 3D rendering, ''enable'' the flags: "Override software rendering list", "GPU rasterization", "Zero-copy rasterizer" in {{ic|chrome://flags}}. Check if it is working in {{ic|chrome://gpu}}. This may also alleviate tearing issues with the [[radeon]] driver.
  
{{Note|As a new version of Chromium will not update {{ic|libpdf.so}}, it may become incompatible. Thus and with respect to possible security fixes it is advisable to update both at the same time.}}
+
If "Native GpuMemoryBuffers" under {{ic|chrome://gpu}} mentions software rendering, you additionally need to pass the {{ic|--enable-native-gpu-memory-buffers}} flag, or some optimizations (like the zero-copy rasterizer) won't do anything. This flag isn't available under {{ic|chrome://flags}} - it must be passed in either the chromium-flags.conf file (as noted in [[Chromium/Tips and tricks#Making flags persistent]]) or directly on the command line.
  
==== Using mozplugger ====
+
=== WebGL ===
 
+
There is the possibility that your graphics card has been blacklisted by Chromium. See [[#Force 3D acceleration]].
{{Box||See the main article: [[Browser Plugins#MozPlugger]]|#E5E5FF|#FCFCFC}}
 
 
 
==== Using the KParts plugin ====
 
 
 
{{Box||See the main article: [[Browser Plugins#kpartsplugin]]|#E5E5FF|#FCFCFC}}
 
 
 
=== Certificates ===
 
 
 
Chromium uses [[Nss|NSS]] for the certificate management. Certificates can be managed in {{ic|Settings}} → {{ic|Show advanced settings...}} → {{ic|Manage Certificates...}}.
 
 
 
== Tips and tricks ==
 
  
{{Box||See the main article: [[Chromium Tips and Tweaks]]|#E5E5FF|#FCFCFC}}
+
If you are using Chromium with [[Bumblebee]], WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with {{ic|optirun chromium --disable-gpu-sandbox}}.
  
== Troubleshooting ==
+
Visit {{ic|chrome://gpu/}} for debugging information about WebGL support.
  
=== Cracking Sound ===
+
Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in {{ic|chrome://gpu}} even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, {{ic|1=chromium --user-data-dir=$(mktemp -d)}} may solve this issue. For a persistent solution you can reset the GPU information by deleting {{ic|~/.config/chromium/Local\ State}}.
  
There have been reports of cracking sound with chromium over hdmi audio. Start chromium with a different audio buffer size to fix the issue:
+
=== Zoomed-in GUI ===
{{bc|<nowiki>
 
$ chromium --audio-buffer-size=2048
 
</nowiki>}}
 
 
 
=== Proxy settings ===
 
 
 
There have been many situations in which proxy settings do not work properly, especially if set through the KDE interface. A good method as of now is to use Chromium's command-line options, like {{ic|--proxy-pac-url}} and {{ic|--proxy-server}}, to set your proxy.
 
 
 
=== Default profile ===
 
 
 
If you cannot get your default profile when you try to run Chromium and get a similar error instead:
 
{{hc|$ chromium|
 
[2630:2630:485325611:FATAL:chrome/browser/browser_main.cc(755)] Check failed: profile.
 
Cannot get default profile. Trace/breakpoint trap
 
}}
 
 
 
You have to set the correct owner of the directory {{ic|~/.config/chromium}} as following:
 
# chown -R ''yourusername'':''yourusergroup'' ~/.config/chromium
 
 
 
=== WebGL ===
 
  
Sometimes, Chromium will disable WebGL with certain graphics card configurations. This can generally be remedied by typing {{ic|about:flags}} into the URL bar and enabling the WebGL flag. You may also enable WebGL by passing the command line flag {{ic|--enable-webgl}} to Chromium in the terminal.
+
Chromium's graphical interface will automatically scale on high-DPI displays. To disable this, use {{ic|1=--force-device-scale-factor=1}}.
  
There is also the possibility that your graphics card has been blacklisted by Chromium. To override this use the {{ic|--ignore-gpu-blacklist}} flag or go to {{ic|about:flags}} and enable {{ic|Override software rendering list}}.
+
=== Password prompt on every start with GNOME Keyring ===
  
If you're using Chromium with [[Bumblebee]], WebGL might crash due to GPU sand-boxing. In this case, you can disable GPU sand-boxing with {{ic|optirun chromium --disable-gpu-sandbox}}.
+
See [[GNOME/Keyring#Passwords are not remembered]].
  
=== Google Play and Flash ===
+
=== Chromecasts in the network are not discovered ===
  
DRM content on Flash still requires HAL to play. This is readily apparent with Google Play Movies. If one attempts to play a Google Play movie without HAL, they will receive a YouTube-like screen, but the video will not play. See [[Flash DRM content]] for more information.
+
You will need to enable the Media Router Component Extension in {{ic|chrome://flags/#load-media-router-component-extension}}.
  
{{Note|It is necessary to use {{Pkg|flashplugin}} since {{AUR|chromium-pepper-flash}} does not work with this method.}}
+
=== Losing cookies and passwords when switching between desktop environments ===
  
=== Force 3D acceleration in Pepper Flash Player and i.g. the browser with radeon driver ===
+
If you see the message {{ic|Failed to decrypt token for service AccountId-*}} in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.
  
To force 3D rendering  there is an option  "Override software rendering list" in {{ic|chrome://flags}}, also you would have to export video acceleration variables, see [[ATI#Enabling_video_acceleration]]. You could check if it is working in  {{ic|chrome://gpu}}.
+
See [[Chromium/Tips and tricks#Force a password store]].
  
 
== See also ==
 
== See also ==
  
* [http://www.chromium.org/Home Chromium homepage]
+
* [https://www.chromium.org/ Chromium homepage]
* [http://googlechromereleases.blogspot.com Google Chrome release notes]
+
* [https://googlechromereleases.blogspot.com Google Chrome release notes]
 
* [https://chrome.google.com/webstore/category/home Chrome web store]
 
* [https://chrome.google.com/webstore/category/home Chrome web store]
* [[Wikipedia: Chromium_(web_browser)#Differences_from_Google_Chrome|Differences between Chromium and Google Chrome]]
+
* [[Wikipedia:Chromium (web browser)#Differences from Google Chrome|Differences between Chromium and Google Chrome]]
 
* [http://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]
 
* [http://peter.sh/experiments/chromium-command-line-switches/ List of Chromium command-line switches]

Latest revision as of 15:47, 6 December 2017

Chromium is an open-source graphical web browser based on the Blink rendering engine. It is the basis for the proprietary Google Chrome browser.

Installation

The open-source project, Chromium, can be installed with the chromium package.

Other alternatives include:

  • Chromium Beta Channel — the beta version
https://googlechromereleases.blogspot.com/ || not packaged? search in AUR
  • Chromium Dev Channel — the development version
https://googlechromereleases.blogspot.com/ || chromium-devAUR
  • Chromium snapshot builds — the untested nightly version
https://build.chromium.org/ || chromium-snapshot-binAUR
  • Chromium with VA-API support — with a patch to enable VA-API
https://chromium-review.googlesource.com/c/chromium/src/+/532294 || chromium-vaapiAUR

The derived browser, Google Chrome, which automatically installs Flash Player and Widevine EME (for e.g. Netflix), can be installed with the google-chromeAUR package.

Other alternatives include:

  • Google Chrome Beta Channel — the beta version
https://www.google.com/chrome/browser/beta.html || google-chrome-betaAUR
  • Google Chrome Dev Channel — the development version
https://www.google.com/chrome/browser/ || google-chrome-devAUR
Note: Support for native client (NaCl) has been dropped in chromium version 54, see FS#51511. Opening NaCl applications will display this error message: "This plugin is not supported". The google-chromeAUR package supports NaCl.

See these two articles for an explanation of the differences between Chromium and Chrome.

On top of the different Chromium build channels, a number of forks exist with more or less special features; see List of applications#Blink-based.

Configuration

Default applications

To set Chromium as the default browser and to change which applications Chromium launches when opening downloaded files, see default applications.

Flash Player plugin

Flash Player is automatically installed when using Google Chrome.

To install it for Chromium, install the pepper-flash package.

Make sure Flash is allowed to run in chrome://settings/content/flash.

Widevine Content Decryption Module plugin

Widevine is Google's Encrypted Media Extensions (EME) Content Decryption Module (CDM). It is used to watch premium video content such as Netflix. It is automatically installed when using Google Chrome.

To install it for Chromium, install the chromium-widevineAUR package. Make sure Allow sites to play protected content is checked in chrome://settings/content/protectedContent.

PDF viewer plugin

Chromium and Google Chrome are bundled with the Chromium PDF Viewer plugin. If you don't want to use this plugin, check Open PDFs using a different application in chrome://settings/content/pdfDocuments.

Certificates

Chromium uses NSS for certificate management. Certificates can be managed in chrome://settings/certificates.

Tips and tricks

See the main article: Chromium/Tips and tricks.

Troubleshooting

Fonts

Note: Chromium does not fully integrate with fontconfig/GTK/Pango/X/etc. due to its sandbox. For more information, see the Linux Technical FAQ.

Font rendering issues in PDF plugin

To fix the font rendering in some PDFs one has to install the ttf-liberation package, otherwise the substituted font causes text to run into other text. This was reported on the chromium bug tracker by an Arch user.

Force 3D acceleration

Warning: Disabling the rendering blacklist may cause unstable behaviour, including crashes of the host. See the bug reports in chrome://gpu.

First follow Hardware video acceleration. Then, to force 3D rendering, enable the flags: "Override software rendering list", "GPU rasterization", "Zero-copy rasterizer" in chrome://flags. Check if it is working in chrome://gpu. This may also alleviate tearing issues with the radeon driver.

If "Native GpuMemoryBuffers" under chrome://gpu mentions software rendering, you additionally need to pass the --enable-native-gpu-memory-buffers flag, or some optimizations (like the zero-copy rasterizer) won't do anything. This flag isn't available under chrome://flags - it must be passed in either the chromium-flags.conf file (as noted in Chromium/Tips and tricks#Making flags persistent) or directly on the command line.

WebGL

There is the possibility that your graphics card has been blacklisted by Chromium. See #Force 3D acceleration.

If you are using Chromium with Bumblebee, WebGL might crash due to GPU sandboxing. In this case, you can disable GPU sandboxing with optirun chromium --disable-gpu-sandbox.

Visit chrome://gpu/ for debugging information about WebGL support.

Chromium can save incorrect data about your GPU in your user profile (e.g. if you use switch between an Nvidia card using Optimus and Intel, it will show the Nvidia card in chrome://gpu even when you're not using it or primusrun/optirun). Running using a different user directory, e.g, chromium --user-data-dir=$(mktemp -d) may solve this issue. For a persistent solution you can reset the GPU information by deleting ~/.config/chromium/Local\ State.

Zoomed-in GUI

Chromium's graphical interface will automatically scale on high-DPI displays. To disable this, use --force-device-scale-factor=1.

Password prompt on every start with GNOME Keyring

See GNOME/Keyring#Passwords are not remembered.

Chromecasts in the network are not discovered

You will need to enable the Media Router Component Extension in chrome://flags/#load-media-router-component-extension.

Losing cookies and passwords when switching between desktop environments

If you see the message Failed to decrypt token for service AccountId-* in the terminal when you start Chromium, it might try to use the wrong password storage backend. This might happen when you switch between Desktop Environments.

See Chromium/Tips and tricks#Force a password store.

See also