Difference between revisions of "Chromium"

From ArchWiki
Jump to: navigation, search
(Configuration: Merge default browser section)
(24 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
[[de:Chromium]]
 
[[es:Chromium]]
 
[[es:Chromium]]
 
[[fr:chromium]]
 
[[fr:chromium]]
Line 4: Line 5:
 
[[zh-CN:Chromium]]
 
[[zh-CN:Chromium]]
 
[[Category:Web Browser]]
 
[[Category:Web Browser]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|General information, installation and troubleshooting for Chromium.}}
+
{{Related|Chromium Tips and Tweaks}}
{{Article summary heading|Related}}
+
{{Related|Browser Plugins}}
{{Article summary wiki|Chromium Tips and Tweaks}}
+
{{Related|Firefox}}
{{Article summary wiki|Browser Plugins}}
+
{{Related|Opera}}
{{Article summary wiki|Firefox}}
+
{{Related articles end}}
{{Article summary wiki|Opera}}
+
 
{{Article summary end}}
+
[[Wikipedia:Chromium (web browser)|Chromium]] is an open source graphical web browser from Google, based on the [[Wikipedia:Blink (layout engine)|Blink]] rendering engine.
[[Wikipedia:Chromium (web browser)|Chromium]] is an open source graphical web browser from Google, based on the [[Wikipedia:WebKit|WebKit]] rendering engine.
+
  
 
== Installation ==
 
== Installation ==
Line 18: Line 18:
 
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 [[Pacman|installed]] with the package {{Pkg|chromium}}, available in the [[official repositories]].  
 
In the [[AUR]] you can also find:
 
In the [[AUR]] you can also find:
* {{AUR|chromium-dev}} - the development version
+
* {{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
 
* {{AUR|chromium-browser-bin}} - the binary version of the latest Chromium build
 
{{note|Compiling Chromium takes at least as long as compiling the Linux kernel.}}
 
  
 
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]].  
 
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]].  
Line 30: Line 28:
 
{{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.}}
 
{{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.}}
  
'''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]].
+
[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]].
  
 
== Configuration ==
 
== Configuration ==
Line 36: Line 34:
 
=== Set Chromium as default browser ===
 
=== Set Chromium as default browser ===
  
This behaviour is related to [[Xdg-open]], please [[Xdg-open#Chromium|see its dedicated section]].
+
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]].
  
 
=== File associations ===
 
=== File associations ===
  
Unlike [[Firefox]], Chromium does not maintain its own database of mimetype-to-application associations. Instead, it relies on [[Xdg-open|xdg-open]] to open files and other mime types and URI schemes, for example, [[Wikipedia:Magnet URI scheme|magnet links]]. There are exceptions to this rule though, for example in the case of ''mailto'' URIs, Chromium calls {{ic|xdg-email}}, which is also part of {{Pkg|xdg-utils}} package.
+
This behaviour is related to [[xdg-open]]: see [[xdg-open#Configuration]]. For more information about the topic in general, see [[Default Applications]].
 
+
Refer to [[Xdg-open|xdg-open]], [[Default Applications|default applications]] or [[Environment Variables|environment variables]] on how to set up default file associations.
+
  
 
=== Font rendering ===
 
=== Font rendering ===
  
Chromium is now supposed to use the [[Font_Configuration|settings]] in {{ic|~/fontconfig/fonts.conf}}. For possibly better rendering you may try:
+
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.
  
{{hc|~/fontconfig/fonts.conf|
+
{{hc|~/.config/fontconfig/fonts.conf|
<match target&#61;"font">
+
<match target&#61;"font">
    <edit name&#61;"autohint" mode&#61;"assign">
+
  <edit mode&#61;"assign" name&#61;"autohint"><bool>true</bool></edit>
      <bool>true</bool>
+
  <edit mode&#61;"assign" name&#61;"hinting"><bool>true</bool></edit>
    </edit>
+
  <edit mode&#61;"assign" name&#61;"hintstyle"><const>hintslight</const></edit>
    <edit name&#61;"hinting" mode&#61;"assign">
+
</match>
      <bool>true</bool>
+
    </edit>
+
    <edit mode&#61;"assign" name&#61;"hintstyle">
+
      <const>hintslight</const>
+
    </edit>
+
  </match>
+
 
}}
 
}}
  
Line 79: Line 69:
  
 
{{Note|These settings will affect any application that uses X Resources for font settings; e.g. [[Rxvt-unicode|rxvt-unicode]].}}
 
{{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]].
 
 
For the Arch Wiki, one only needs the {{Pkg|ttf-arphic-uming}} package.
 
  
 
=== Flash Player plugin ===
 
=== Flash Player plugin ===
  
==== Adobe (Netscape plugin API) ====
+
==== Adobe Flash Player (Netscape plugin API) ====
{{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]}}
+
{{Warning|This version will not be updated (except for security updates), and is stuck at version 11.2. It will be completely disabled by the end of 2014.[http://www.chromium.org/developers/npapi-deprecation]}}
 
The Adobe Flash plugin can be [[Pacman|installed]] with the package {{Pkg|flashplugin}}, available in the official repositories.
 
The Adobe Flash plugin can be [[Pacman|installed]] with the package {{Pkg|flashplugin}}, available in the official repositories.
  
==== Adobe (Pepper plugin API) ====
+
==== Adobe Flash Player (Pepper plugin API) ====
  
 
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.
 
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.
Line 100: Line 84:
 
* {{AUR|chromium-pepper-flash}} for a development version.
 
* {{AUR|chromium-pepper-flash}} for a development version.
  
Enable the Flash Player plugin with location {{ic|/usr/lib/PepperFlash/libpepflashplayer.so}} in {{ic|chrome://plugins}} and disable the plugin with location {{ic|/usr/lib/mozilla/plugins/libflashplayer.so}}.
+
{{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}}.
{{Note|1=If Pepper Flash doesn't show up in the plugins list for [http://www.srware.net/en/software_srware_iron.php Iron], then disable {{ic|libflashplayer.so}} and start it with:
+
* 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}}
 
  {{bc|1=$ iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.9.900.117}}
 
}}
 
}}
Line 120: Line 104:
 
Enable the plugin in {{ic|chrome://plugins}}.
 
Enable the plugin in {{ic|chrome://plugins}}.
  
{{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  
+
{{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.}}
 +
 
 +
{{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  
 
  install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/usr/lib/chromium"''
 
  install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/usr/lib/chromium"''
 
with
 
with
 
  install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/opt/chromium-browser"''
 
  install -m644 opt/google/chrome/libpdf.so "${pkgdir}''/opt/chromium-browser"''
 
}}
 
}}
 
===== Manual installation =====
 
 
To do it manually, download a Google Chrome release that corresponds to the version of Chromium you use:
 
 
$ curl -O https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_i386.deb
 
$ 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:
 
$ ar vx ''deb-file''
 
 
Extract LZMA the archive with:
 
$ 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).
 
 
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).
 
 
{{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.}}
 
  
 
==== Using mozplugger ====
 
==== Using mozplugger ====
Line 164: Line 129:
  
 
== Troubleshooting ==
 
== Troubleshooting ==
 +
 +
=== Cracking Sound ===
 +
 +
There have been reports of cracking sound with chromium over hdmi audio. Start chromium with a different audio buffer size to fix the issue:
 +
{{bc|<nowiki>
 +
$ chromium --audio-buffer-size=2048
 +
</nowiki>}}
  
 
=== Proxy settings ===
 
=== Proxy settings ===
Line 185: Line 157:
  
 
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}}.
 
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}}.
 +
 +
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}}.
  
 
=== Google Play and Flash ===
 
=== Google Play and Flash ===
  
{{Out of date|HAL is no longer used in Arch.}}
+
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.
  
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.
+
{{Note|It is necessary to use {{Pkg|flashplugin}} since {{AUR|chromium-pepper-flash}} does not work with this method.}}
 
+
{{Note|{{AUR|chromium-pepper-flash}} does not work with this method. The user must ensure they are using {{Pkg|flashplugin}}.}}
+
 
+
As per [http://isenmann.blogspot.gr/2012/08/watching-movies-from-google-play-with.html "Watching movies from Google Play on Arch Linux"]; install {{AUR|hal}} and {{AUR|hal-info}}. Then remove any previous cache files for Flash:
+
$ rm -rf ~/.adobe/Flash_Player/*
+
 
+
Start the HAL daemon and one will be able to watch Google Play Movie content.
+
{{bc|<nowiki>
+
# systemctl start hal
+
</nowiki>}}
+
 
+
Alternately one can just save the following Bash script below and run it before they want to watch Google Play Movie content.
+
{{bc|<nowiki>
+
#!/bin/bash
+
 
+
## written by Mark Lee <bluerider>
+
## using information from <https://wiki.archlinux.org/index.php/Chromium#Google_Play_.26_Flash>
+
 
+
## Start and stop HAL service on command for Google Play Movie service
+
 
+
function main () {  ## run the main insertion function
+
clear-cache;  ## remove adobe cache
+
start-hal;  ## start the hal daemon
+
read -p "Press 'enter' to stop hal";  ## pause the command line with a read line
+
stop-hal;  ## stop the hal daemon
+
}
+
 
+
function clear-cache () {  ## remove adobe cache
+
cd ~/.adobe/Flash_Player;  ## go to Flash player user directory
+
rm -rf NativeCache AssetCache APSPrivateData2;  ## remove cache
+
}
+
 
+
function start-hal () {  ## start the hal daemon
+
sudo systemctl start hal && ( ## systemd : start hal daemon
+
echo "Started HAL service..."
+
) || (
+
echo "Failed to start HAL service!"
+
)
+
}
+
 
+
function stop-hal () {  ## stop the hal daemon
+
sudo systemctl stop hal && (  ## systemd : stop HAL daemon
+
echo "Stopped HAL service..."
+
) || (
+
echo "Failed to stop HAL service!"
+
)
+
}
+
 
+
main;  ## run the main insertion function
+
</nowiki>}}
+
  
 
=== Force 3D acceleration in Pepper Flash Player and i.g. the browser with radeon driver ===
 
=== Force 3D acceleration in Pepper Flash Player and i.g. the browser with radeon driver ===

Revision as of 21:15, 14 January 2014

Chromium is an open source graphical web browser from Google, based on the Blink rendering engine.

Installation

The open source project, Chromium, can be installed with the package chromium, available in the official repositories. In the AUR you can also find:

  • chromium-devAUR - the development version (beware: compiling Chromium takes at least as long as compiling the Linux kernel!)
  • chromium-browser-binAUR - 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 google-chromeAUR, available in the AUR. In the AUR you can also find:

Tip: See these two articles for an explanation of the differences between Stable/Beta/Dev, as well as Chromium vs. Chrome and the version numbers.

SRWare Iron, a modified Chromium with altered settings to increase privacy and with built-in ad-blocker, can be installed with the package iron-binAUR, available in the AUR.

Configuration

Set Chromium as default browser

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.

File associations

This behaviour is related to xdg-open: see xdg-open#Configuration. For more information about the topic in general, see Default Applications.

Font rendering

Chromium (and Google Chrome) will use the settings in ~/.config/fontconfig/fonts.conf. For possibly better rendering you may try the following. Create the file if it does not already exist.

~/.config/fontconfig/fonts.conf
<match target="font">
  <edit mode="assign" name="autohint"><bool>true</bool></edit>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
</match>

If the fonts are still rendered badly, you can use Xft settings as suggested here:

~/.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.

Flash Player plugin

Adobe Flash Player (Netscape plugin API)

Warning: This version will not be updated (except for security updates), and is stuck at version 11.2. It will be completely disabled by the end of 2014.[1]

The Adobe Flash plugin can be installed with the package flashplugin, available in the official repositories.

Adobe Flash Player (Pepper plugin API)

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.

The easiest way to install pepper-flash for Chromium is using one of the packages provided in the AUR:

Note:
  • If you have still flashplugin installed, in order for Chromium to use this new Pepper Flash plugin, please make sure the plugin location from /usr/lib/mozilla/plugins/libflashplayer.so is disabled and /usr/lib/PepperFlash/libpepflashplayer.so is enabled in chrome://plugins.
  • If you use SRWare Iron, and have still flashplugin installed and if the Pepper Flash doesn't show up in the plugins list, then disable libflashplayer.so and start Iron with:
$ iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.9.900.117

PDF viewer plugin

There are multiple ways of enabling PDF support in Chromium that are detailed below.

libpdf

libpdf is Google's own implementation of a PDF renderer included with Google Chrome. It is compatible with Chromium and Iron.

The easiest way to install libpdf for Chromium is using one of the packages provided in the AUR:

Enable the plugin in chrome://plugins.

Note: As a new version of Chromium will not update libpdf.so, it may become incompatible. Thus and with respect to possible security fixes it is advisable to update both at the same time.
Note: To install libpdf for other Chromium packages, edit the PKGBUILD of chromium-libpdf-stableAUR to install libpdf.so into correct path. For example, to install it for chromium-browser-binAUR, replace
install -m644 opt/google/chrome/libpdf.so "${pkgdir}/usr/lib/chromium"

with

install -m644 opt/google/chrome/libpdf.so "${pkgdir}/opt/chromium-browser"

Using mozplugger

Template:Box

Using the KParts plugin

Template:Box

Certificates

Chromium uses NSS for the certificate management. Certificates can be managed in SettingsShow advanced settings...Manage Certificates....

Tips and tricks

Template:Box

Troubleshooting

Cracking Sound

There have been reports of cracking sound with chromium over hdmi audio. Start chromium with a different audio buffer size to fix the issue:

$ chromium --audio-buffer-size=2048

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 --proxy-pac-url and --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:

$ 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 ~/.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 about:flags into the URL bar and enabling the WebGL flag. You may also enable WebGL by passing the command line flag --enable-webgl to Chromium in the terminal.

There is also the possibility that your graphics card has been blacklisted by Chromium. To override this use the --ignore-gpu-blacklist flag or go to about:flags and enable Override software rendering list.

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 optirun chromium --disable-gpu-sandbox.

Google Play and Flash

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.

Note: It is necessary to use flashplugin since chromium-pepper-flashAUR does not work with this method.

Force 3D acceleration in Pepper Flash Player and i.g. the browser with radeon driver

To force 3D rendering there is an option "Override software rendering list" in chrome://flags, also you would have to export video acceleration variables, see ATI#Enabling_video_acceleration. You could check if it is working in chrome://gpu.

See also