Difference between revisions of "Chromium"

From ArchWiki
Jump to: navigation, search
(Font Rendering)
m (Adobe (Netscape plugin API): spelling)
(47 intermediate revisions by 11 users not shown)
Line 15: Line 15:
  
 
== Installation ==
 
== Installation ==
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}} - a development version of the Chromium browser.
+
* {{AUR|chromium-dev}} - the development version
* {{AUR|chromium-update}} - an update. script for Chromium nighly builds, pre-compiled on the Chromium buildbot server.
+
* {{AUR|chromium-browser-bin}} - the binary version of the latest Chromium build
* {{AUR|chromium-browser-bin}} - a binary version of the latest Chromium build.
+
* {{AUR|iron-bin}} - a binary version of Chromium without Google's 'tracking features'
+
  
{{Note|Compiling {{AUR|chromium-dev}} takes at least as long as compiling the Linux kernel.}}
+
{{note|Compiling Chromium takes at least as long as compiling the Linux kernel.}}
  
Various versions of the modified Google Chrome browser can be found 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]].
* {{AUR|google-chrome}}
+
In the [[AUR]] you can also find:
* {{AUR|google-chrome-beta}}
+
* {{AUR|google-chrome-beta}} - the beta version
* {{AUR|google-chrome-dev}}
+
* {{AUR|google-chrome-dev}} - the development version
  
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]].
  
 
== Configuration ==
 
== Configuration ==
Line 36: Line 36:
 
=== 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, for example, [[Wikipedia:Magnet URI scheme|magnet links]].
+
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.
  
There are exceptions to this rule though. In the case of ''mailto'' URIs, Chromium calls out to {{ic|xdg-email}} which is similar to {{ic|xdg-open}}. Other protocol handlers may have equivalent scripts so check {{ic|/usr/bin/xdg*}}.  
+
Refer to [[Xdg-open|xdg-open]], [[Default Applications|default applications]] or [[Environment Variables|environment variables]] on how to set up default file associations.
  
The behaviour of {{ic|xdg-*}} tools is managed automatically in environments such as [[GNOME]], [[KDE]], [[Xfce]] or [[LXDE]], but does not work in others. Usually this behaviour can be fixed by tricking them into thinking that they are operating in one of the supported desktop environments. Depending on your environment one may work and another will not so trying each is recommended. You can set the desktop environment with the following variable:
+
==== Default browser ====
export DE=INSERT_DE_HERE
+
  
where the recognised desktop environments are: '''gnome''', '''kde''', '''xfce''' and '''lxde'''. For the variable to be always set, put it somewhere like {{ic|~/.xinitrc}} or {{ic|~/.bashrc}}.
+
{{Merge|Xdg-open|cover the topic in one place, not on every page of every browser}}
  
An alternative is to edit the {{ic|xdg-open}} or {{ic|xdg-email}} scripts and '''hard-code''' a useful DE. At the bottom of the file you will see something like this:
+
The simplest way to make Chromium the default browser is to set variable {{Ic|<nowiki>$BROWSER=chromium</nowiki>}} in {{ic|~/.profile}}
{{hc|/usr/bin/xdg-open|<nowiki>
+
if [ -n "$DISPLAY" ]; then
detectDE
+
        BROWSER=chromium
 +
fi
  
if [ x"$DE" = x"" ]; then
+
To test if this was applied successfully, try to open an URL with {{ic|xdg-open}} as follows:
    DE=generic
+
$ xdg-open http://google.com/
fi
+
If everything went well, either a new tab inside Chromium, or a new window would open and display the Google homepage, depending on your settings.
  
DEBUG 2 "Selected DE $DE"
+
Another option, when using {{AUR|mimeo}}, is to associate "http://" links with Chromium:
 
+
{{hc|~/.config/mimeo.conf|<nowiki>
# if BROWSER variable is not set, check some well known browsers instead
+
/usr/bin/chromium
if [ x"$BROWSER" = x"" ]; then
+
  ^http://
    BROWSER=links2:elinks:links:lynx:w3m
+
</nowiki>}}
    if [ -n "$DISPLAY" ]; then
+
        BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
+
    fi
+
fi
+
  
case "$DE" in
+
If all of that still does not get it working, you can try adding the following to the {{ic|[Added Associations]}} list in {{ic|~/.local/share/applications/mimeapps.list}}:
    kde)
+
x-scheme-handler/http=chromium.desktop
    open_kde "$url"
+
    ;;
+
 
+
    gnome*)
+
    open_gnome "$url"
+
    ;;
+
 
+
    mate)
+
    open_mate "$url"
+
    ;;
+
  
    xfce)
+
If even that didn't work, try this:
    open_xfce "$url"
+
{{bc|
    ;;
+
$ xdg-mime default chromium.desktop x-scheme-handler/http
 +
$ xdg-mime default chromium.desktop x-scheme-handler/https
 +
}}
  
    lxde)
+
For more info, see [[Xdg-open]].
    open_lxde "$url"
+
    ;;
+
  
    generic)
+
=== Font rendering ===
    open_generic "$url"
+
    ;;
+
  
    *)
+
Chromium is now supposed to use the settings in {{ic|~/.fonts.conf}}, though you may have to edit it manually (see [[Font_Configuration#Basic_settings|Font Configuration]]).
     exit_failure_operation_impossible "no method available for opening '$url'"
+
If your fonts setting are stored in another place, create {{ic|~/.fonts.conf}} and add these lines:
     ;;
+
{{hc|~/.fonts.conf|
esac</nowiki>
+
<match target&#61;"font">
 +
     <edit name&#61;"autohint" mode&#61;"assign">
 +
      <bool>true</bool>
 +
     </edit>
 +
    <edit name&#61;"hinting" mode&#61;"assign">
 +
      <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]]. Create {{ic|~/.Xresources}} if it does not exist and add in:
change the third line: {{ic|DE&#61;generic}} to one of the supported desktop environments (e.g. {{ic|DE&#61;gnome}}).
+
 
+
{{Note|These changes are lost when any of the utilities are upgraded.}}
+
 
+
An approach which is less useful is to place the required application in the default browser list:
+
 
+
    BROWSER=links2:links:lynx:w3m
+
    if [ -n "$DISPLAY" ]; then
+
        BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
+
    fi
+
 
+
{{ic|xdg-open}} and {{ic|xdg-email}} fall back to this list of browsers and will use the first that they find to attempt to open the URI. You could add the name of the application to the beginning of the list. However there is no guarantee that the application will be called correctly to meet your needs, e.g. your mail client will open but it will not correctly receive the ''mailto'' address. Also it will only work for one application.
+
 
+
A fourth option is to make a softlink from your preferred application to one of the names on the browser list. This approach has the same problems as the previous work around. For more discussion on these ideas see [https://bbs.archlinux.org/viewtopic.php?id=81282&p=1 this forum thread].
+
 
+
=== Font Rendering ===
+
Chromium is now supposed to use the settings in {{ic|~/.fonts.conf}}, though you may have to edit it manually (see [[Font_Configuration#Basic_settings|Font Configuration]]). If the fonts are still rendered badly, you can use Xft settings [[X resources|as suggested here]]. Create {{ic|~/.Xresources}} if it does not exist and add in:
+
 
{{hc|~/.Xresources|
 
{{hc|~/.Xresources|
 
...
 
...
 
! Xft settings ---------------------------------------------------------------
 
! Xft settings ---------------------------------------------------------------
Xft.autohint:  false
 
 
Xft.dpi:        96
 
Xft.dpi:        96
 
Xft.antialias:  true
 
Xft.antialias:  true
Line 125: Line 101:
 
Then update the X Resources database using:
 
Then update the X Resources database using:
  
{{bc|xrdb -merge ~/.Xresources}}
+
$ xrdb -merge ~/.Xresources
  
 
{{Note|These settings will affect any application that uses X Resources for font settings; one example is [[Rxvt-unicode|rxvt-unicode]].}}
 
{{Note|These settings will affect any application that uses X Resources for font settings; one example is [[Rxvt-unicode|rxvt-unicode]].}}
  
 
==== Non-Latin characters ====
 
==== 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]].
 
Install needed fonts to correctly display Chinese, Japanese, Korean characters. For examples of recommended fonts for various languages see [[Fonts#Font_packages|Font Packages]].
  
=== Default browser ===
+
For the Arch Wiki, one only needs the {{Pkg|ttf-arphic-uming}} package.
The simplest way to make Chromium the default browser is to set variable {{Ic|<nowiki>$BROWSER=chromium</nowiki>}} in {{ic|~/.profile}}
+
if [ -n "$DISPLAY" ]; then
+
      BROWSER=chromium
+
fi
+
  
To test if this was applied successfully, try to open an URL with {{ic|xdg-open}} as follows:
+
=== Flash Player plugin ===
$ xdg-open http://google.com/
+
If everything went well, either a new tab inside Chromium, or a new window would open and display the Google homepage, depending on your settings.
+
  
Another option, when using {{AUR|mimeo}}, is to associate "http://" links with Chromium:
+
==== Adobe (Netscape plugin API) ====
{{hc|~/.config/mimeo.conf|<nowiki>
+
{{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]}}
/usr/bin/chromium
+
The Adobe Flash plugin can be [[Pacman|installed]] with the package {{Pkg|flashplugin}}, available in the official repositories.
  ^http://
+
</nowiki>}}
+
  
If all of that still does not get it working, you can try adding the following to the {{ic|[Added Associations]}} list in  {{ic|~/.local/share/applications/mimeapps.list}}:
+
==== Adobe (Pepper plugin API) ====
x-scheme-handler/http=chromium.desktop
+
  
For more info, see [[Xdg-open]].
+
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.
  
=== Flash Player ===
+
The easiest way to install '''pepper-flash''' for Chromium is using one of the packages provided in the [[AUR]]:
The Adobe Flash plugin can be [[Pacman|installed]] with the package {{Pkg|flashplugin}}, available in the official repositories.  
+
* {{AUR|chromium-pepper-flash-stable}} for the stable version.
 +
* {{AUR|chromium-pepper-flash}} for a development version.
  
While the classic Flash plugin will not be updated for Linux, Chromium can use the Flash plugin from Google Chrome (that uses the new Pepper API). This plugin is available in the [[AUR]] with the {{AUR|chromium-pepper-flash}} or {{AUR|chromium-pepper-flash-stable}} packages.  
+
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|Make sure to enable the Flash 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|1=If Pepper Flash doesn't show up in the plugins list (as is the case for Iron), then disable {{ic|libflashplayer.so}} and start with
 +
{{bc|1=iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.7.700.169}}
 +
}}
  
If Pepper Flash doesn't show up in the plugins list (as is the case for Iron) then disable libflashplayer.so and start with the following command.
+
=== PDF viewer plugin ===
iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.5.31.101
+
  
=== Open PDF files inside Chromium ===
+
There are multiple ways of enabling PDF support in Chromium that are detailed below.
  
There are multiple ways of enabling PDF support in Chromium that are detailed below. 
+
==== libpdf ====
  
==== Using Google Chrome's libpdf ====
+
'''libpdf''' is Google's own implementation of a PDF renderer included with Google Chrome. It is compatible with Chromium and Iron.
  
'''libpdf''' is Google's own implementation of a PDF renderer. While compatible, it is currently only part of Chrome releases, not Chromium ones.
+
The easiest way to install '''libpdf''' for Chromium is using one of the packages provided in the [[AUR]]:
 +
* {{AUR|chromium-libpdf-stable}} for the stable version.
 +
* {{AUR|chromium-libpdf}} for a development version.
  
The easiest way to add it to the latter is using one of the packages provided in the [[AUR]]:
+
Enable the plugin in {{ic|chrome://plugins}}.
* {{AUR|chromium-stable-libpdf}} for the stable version of the browser.
+
 
* {{AUR|chromium-libpdf}} for a development version that installs to {{ic|/usr/lib/chromium}} (such as {{AUR|chromium-dev}}).
+
{{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
* {{AUR|chromium-browser-libpdf}} for a development version that installs to {{ic|/opt/chromium-browser}} (such as {{AUR|chromium-browser-bin}}).
+
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 =====
  
 
To do it manually, download a Google Chrome release that corresponds to the version of Chromium you use:
 
To do it manually, download a Google Chrome release that corresponds to the version of Chromium you use:
Line 180: Line 157:
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_i386.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_i386.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
 
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
 
  $ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
  
 
Extract the deb file with
 
Extract the deb file with
  $ ar vx <deb-file>
+
  $ ar vx ''deb-file''
  
 
Extract LZMA archive with
 
Extract LZMA archive with
  $ tar -xJf <lzma-file>
+
  $ 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).
 
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 ''about:plugins'' and check  if "Chrome PDF Viewer" is available (it may need to be enabled).
+
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.}}
 
{{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 ====
 +
 
{{Box||See the main article: [[Browser Plugins#MozPlugger]]|#E5E5FF|#FCFCFC}}
 
{{Box||See the main article: [[Browser Plugins#MozPlugger]]|#E5E5FF|#FCFCFC}}
 
For information about the installation see [[Browser Plugins#PDF viewer]].
 
  
 
==== Using the KParts plugin ====
 
==== Using the KParts plugin ====
 +
 
{{Box||See the main article: [[Browser Plugins#kpartsplugin]]|#E5E5FF|#FCFCFC}}
 
{{Box||See the main article: [[Browser Plugins#kpartsplugin]]|#E5E5FF|#FCFCFC}}
  
Line 208: Line 184:
 
Chromium uses [[Nss|NSS]] for the certificate management. Certificates can be managed (including added) by going to ''Settings'', clicking the  ''Show advanced settings..'' link and then ''Manage Certificates''.
 
Chromium uses [[Nss|NSS]] for the certificate management. Certificates can be managed (including added) by going to ''Settings'', clicking the  ''Show advanced settings..'' link and then ''Manage Certificates''.
  
== Tips and Tricks ==
+
== Tips and tricks ==
 +
 
 
{{Box||See the main article: [[Chromium Tips and Tweaks]]|#E5E5FF|#FCFCFC}}
 
{{Box||See the main article: [[Chromium Tips and Tweaks]]|#E5E5FF|#FCFCFC}}
  
 
== Troubleshooting ==
 
== Troubleshooting ==
  
=== Proxy Settings ===
+
=== 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.
 
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 ===
 
=== Default profile ===
 +
 
If you cannot get your default profile when you try to run Chromium and get a similar error instead:
 
If you cannot get your default profile when you try to run Chromium and get a similar error instead:
{{bc|
+
{{hc|$ chromium|
$ chromium
+
 
[2630:2630:485325611:FATAL:chrome/browser/browser_main.cc(755)] Check failed: profile.  
 
[2630:2630:485325611:FATAL:chrome/browser/browser_main.cc(755)] Check failed: profile.  
 
Cannot get default profile. Trace/breakpoint trap
 
Cannot get default profile. Trace/breakpoint trap
 
}}
 
}}
  
you have to set the correct owner of the directory {{ic|~/.config/chromium}} as following:
+
You have to set the correct owner of the directory {{ic|~/.config/chromium}} as following:
  $ sudo chown -R yourusername:yourusergroup /home/yourusername/.config/chromium
+
  # chown -R yourusername:yourusergroup ~/.config/chromium
  
 
=== WebGL ===
 
=== WebGL ===
Line 233: Line 211:
 
There is also the possibility that your graphics card has been blacklisted by Chromium. To override this, pass the flag {{ic|--ignore-gpu-blacklist}} when starting Chromium, alternatively, go to {{ic|about:flags}} and enable ''Override software rendering list''.
 
There is also the possibility that your graphics card has been blacklisted by Chromium. To override this, pass the flag {{ic|--ignore-gpu-blacklist}} when starting Chromium, alternatively, go to {{ic|about:flags}} and enable ''Override software rendering list''.
  
=== Pulseaudio & PA-Alsa-Bridge & Pepper-Flash ===
+
=== PulseAudio, PA-ALSA-Bridge and Pepper-Flash ===
  
Given a certain version of Chrome (23.x seem to exhibit this problem) and Pepper-Flash (11.x) while using the PA-Alsa-Bridge, sound may not play, become distorted, start skipping or outright keep crashing the PA-Alsa-Bridge continously. See [http://code.google.com/p/chromium/issues/detail?id=128870] for the bugreport.
+
Given a certain version of Chrome (23.x seem to exhibit this problem) and Pepper-Flash (11.x) while using the PA-Alsa-Bridge, sound may not play, become distorted, start skipping or outright keep crashing the PA-ALSA-Bridge continuously. See [http://code.google.com/p/chromium/issues/detail?id=128870] for the bug report.
  
A possible workaround is to use {{ic|pasuspender}} to suspend Pulseaudio and force Chrome to use Alsa directly.
+
A possible workaround is to use {{ic|pasuspender}} to suspend PulseAudio and force Chrome to use ALSA directly.
  
First, create an {{ic|~/.asoundrc}} file to default Alsa to your real hardware instead of Pulseaudio. See [[Alsa]] and [http://alsa.opensrc.org/FAQ026] for more information. Exemplary {{ic|~/.asoundrc}}:
+
First, create an {{ic|~/.asoundrc}} file to default ALSA to your real hardware instead of PulseAudio. See [[ALSA]] and [http://alsa.opensrc.org/FAQ026] for more information. Exemplary {{ic|~/.asoundrc}}:
  
 
{{hc|~/.asoundrc|
 
{{hc|~/.asoundrc|
 
pcm. !default {
 
pcm. !default {
    type hw
+
type hw
    card 0
+
card 0
    device 0
+
device 0
 
}
 
}
 
}}
 
}}
  
Then use {{ic|pasuspender}} to suspend Pulseaudio and force Chrome to use Alsa which now uses your real hardware.
+
Then use {{ic|pasuspender}} to suspend PulseAudio and force Chrome to use ALSA which now uses your real hardware.
  
 
{{bc|
 
{{bc|
Line 255: Line 233:
 
}}
 
}}
  
== See Also ==
+
The problem might be related to the {{ic|1=tsched=0}} option in PulseAudio. See [[Pulseaudio#Glitches, skips or crackling]] and comment #27 in [http://code.google.com/p/chromium/issues/detail?id=128870#c27].
* [http://www.chromium.org/Home Chromium Homepage]
+
 
* [http://googlechromereleases.blogspot.com Google Chrome Release Notes]
+
=== Google Play and Flash ===
* [https://chrome.google.com/webstore/category/home Chrome Web Store]
+
 
 +
{{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.
 +
 
 +
{{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 run the following commands:
 +
{{bc|<nowiki>
 +
cd ~/.adobe/Flash_Player;                      ## enter the Adobe Flash Player directory
 +
rm -rf NativeCache AssetCache APSPrivateData2;  ## remove cache
 +
</nowiki>}}
 +
 
 +
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 ===
 +
 
 +
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 also ==
 +
 
 +
* [http://www.chromium.org/Home Chromium homepage]
 +
* [http://googlechromereleases.blogspot.com Google Chrome release notes]
 +
* [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]

Revision as of 17:29, 28 September 2013

Summary help replacing me
General information, installation and troubleshooting for Chromium.
Related
Chromium Tips and Tweaks
Browser Plugins
Firefox
Opera

Chromium is an open source graphical web browser from Google, based on the WebKit 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:

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 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

File associations

Unlike Firefox, Chromium does not maintain its own database of mimetype-to-application associations. Instead, it relies on xdg-open to open files and other mime types and URI schemes, for example, magnet links. There are exceptions to this rule though, for example in the case of mailto URIs, Chromium calls xdg-email, which is also part of xdg-utils package.

Refer to xdg-open, default applications or environment variables on how to set up default file associations.

Default browser

Merge-arrows-2.pngThis article or section is a candidate for merging with Xdg-open.Merge-arrows-2.png

Notes: cover the topic in one place, not on every page of every browser (Discuss in Talk:Chromium#)

The simplest way to make Chromium the default browser is to set variable $BROWSER=chromium in ~/.profile

if [ -n "$DISPLAY" ]; then
        BROWSER=chromium
fi

To test if this was applied successfully, try to open an URL with xdg-open as follows:

$ xdg-open http://google.com/

If everything went well, either a new tab inside Chromium, or a new window would open and display the Google homepage, depending on your settings.

Another option, when using mimeoAUR, is to associate "http://" links with Chromium:

~/.config/mimeo.conf
/usr/bin/chromium
  ^http://

If all of that still does not get it working, you can try adding the following to the [Added Associations] list in ~/.local/share/applications/mimeapps.list:

x-scheme-handler/http=chromium.desktop

If even that didn't work, try this:

$ xdg-mime default chromium.desktop x-scheme-handler/http
$ xdg-mime default chromium.desktop x-scheme-handler/https

For more info, see Xdg-open.

Font rendering

Chromium is now supposed to use the settings in ~/.fonts.conf, though you may have to edit it manually (see Font Configuration). If your fonts setting are stored in another place, create ~/.fonts.conf and add these lines:

~/.fonts.conf
 <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hinting" mode="assign">
      <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. Create ~/.Xresources if it does not exist and add in:

~/.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; one example is rxvt-unicode.

Non-Latin characters

Install needed fonts to correctly display Chinese, Japanese, Korean characters. For examples of recommended fonts for various languages see Font Packages.

For the Arch Wiki, one only needs the ttf-arphic-uming package.

Flash Player plugin

Adobe (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.[1]

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

Adobe (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:

Enable the Flash Player plugin with location /usr/lib/PepperFlash/libpepflashplayer.so in chrome://plugins and disable the plugin with location /usr/lib/mozilla/plugins/libflashplayer.so.

Note: If Pepper Flash doesn't show up in the plugins list (as is the case for Iron), then disable libflashplayer.so and start with
iron --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.7.700.169

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: 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"
Manual installation

To do it manually, download a Google Chrome release that corresponds to the version of Chromium you use:

$ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_i386.deb
$ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
$ wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ wget https://dl-ssl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb

Extract the deb file with

$ ar vx deb-file

Extract LZMA archive with

$ tar -xJf lzma-file

Move libpdf.so from opt/google/chrome/ to the appropriate directory as stated above. A change of its file permissions and ownership may be necessary (the permission of libpdf.so should be 755).

To verify that the installation went correctly: start Chromium, open 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 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

Template:Box

Using the KParts plugin

Template:Box

Certificates

Chromium uses NSS for the certificate management. Certificates can be managed (including added) by going to Settings, clicking the Show advanced settings.. link and then Manage Certificates.

Tips and tricks

Template:Box

Troubleshooting

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, pass the flag --ignore-gpu-blacklist when starting Chromium, alternatively, go to about:flags and enable Override software rendering list.

PulseAudio, PA-ALSA-Bridge and Pepper-Flash

Given a certain version of Chrome (23.x seem to exhibit this problem) and Pepper-Flash (11.x) while using the PA-Alsa-Bridge, sound may not play, become distorted, start skipping or outright keep crashing the PA-ALSA-Bridge continuously. See [2] for the bug report.

A possible workaround is to use pasuspender to suspend PulseAudio and force Chrome to use ALSA directly.

First, create an ~/.asoundrc file to default ALSA to your real hardware instead of PulseAudio. See ALSA and [3] for more information. Exemplary ~/.asoundrc:

~/.asoundrc
pcm. !default {
	type hw
	card 0
	device 0
}

Then use pasuspender to suspend PulseAudio and force Chrome to use ALSA which now uses your real hardware.

pasuspender -- google-chrome

The problem might be related to the tsched=0 option in PulseAudio. See Pulseaudio#Glitches, skips or crackling and comment #27 in [4].

Google Play and Flash

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: HAL is no longer used in Arch. (Discuss in Talk:Chromium#)

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: chromium-pepper-flashAUR does not work with this method. The user must ensure they are using flashplugin.

As per "Watching movies from Google Play on Arch Linux"; install halAUR and hal-infoAUR. Then run the following commands:

cd ~/.adobe/Flash_Player;                       ## enter the Adobe Flash Player directory
rm -rf NativeCache AssetCache APSPrivateData2;  ## remove cache

Start the HAL daemon and one will be able to watch Google Play Movie content.

# systemctl start hal

Alternately one can just save the following Bash script below and run it before they want to watch Google Play Movie content.

#!/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

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