From ArchWiki
Revision as of 19:10, 16 July 2011 by Mitch feaster (Talk | contribs) (Default browser: method using mimeapps.list)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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


The stable version of chromium can be installed from the official repository by:

# pacman -S chromium

There are also beta and dev versions, which can be found in Arch User Repository under the name of chromium-browser-beta and chromium-dev resp. binary as chromium-browser-bin.

Note: Compiling chromium-beta or chromium-dev takes at least as long as compiling the linux kernel.

There are also some packages in the AUR which provide the binary version of Google Chrome.

See this article for an explanation of the differences between the three flavours, Chromium vs. Chrome, and the version numbers.


Displaying various non-latin scripts

To correctly display Chinese, Japanese, Korean... etc characters, see here for detailed instructions to install various TrueType fonts.

Using chromium with no desktop environment

Unlike Firefox, chromium does not maintain its own database of mimetype-to-application associations. Instead, it relies on Template:Filename (part of extra/xdg-utils) to open files and, for example, magnet links.

Inside a desktop environment (e.g. Gnome, or Kde, or Xfce), Template:Filename simply passes the arguments to that desktop environment's file-opener application (Template:Filename, Template:Filename, or Template:Filename, respectively), which means that the associations are left up to the desktop environment.

However, when no desktop environment is detected (for example when one runs a standalone window manager, e.g. Openbox), Template:Filename's behaviour becomes rather strange and annoying: many filetypes opened in firefox or chromium itself, no support for magnet links, etc.

There are a number of possible solutions to this problem, outlined below.

  • Improve xdg-open, make it smarter (aka "patches welcome" :P )
  • Use part of a desktop environment, specifically, the part which includes the file opener; for gnome, that would be 'libgnome' (and its dependencies), for xfce, 'exo'. The $DE environment variable needs to be exported before starting the window manager. For example:
  • Use pcmanfm file associations (eg. for lxde desktop enviroment users). Change:

or modify your .profile

  • When using openbox and no Desktop Environment (=DE) like KDE, GNOME or XFCE do following:
Attention: Do not export any DE environment variable !

Then, you basically have to fill the ~/.local/share/applications/defaults.list file with default associations. As this can be painful, some utilities are available:

  • xdg-mime: not that intuitive; e.g. to use xpdf as default pdf viewer:
$ xdg-mime default xpdf.desktop application/pdf
  • mimetype (perl-file-mimeinfo package): more intuitive; e.g. to select default application for a given extension (you need a sample file):
$ mimetype -d file.extension

This should create an entry in your local mime database:


Restart chromium and your pdf files should be opened with xpdf now. For me it only worked as normal user - as root I had problems cause no directories for the local mime times were created. See also this thread [1].

You could also try installing perl-file-mimeinfo

Font Rendering

Chromium is now supposed to use the settings in Template:Filename, though you may have to edit it manually (see Font Configuration). If the fonts are still rendered badly you can use xft settings as suggested here. Just create Template:Filename if it doesn't exist and add in:

! Xft settings ---------------------------------------------------------------

Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight
Note: these settings will affect any application that reads Template:Filename, not just chromium; one example is rxvt-unicode.

Default browser

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

if [ -n "$DISPLAY" ]; then

The other way is to edit the xdg-open script.

$ sudo $YOUR_EDITOR /usr/bin/xdg-open

At almost the bottom on the file, is a long horizontal list of browsers:

if [ x"$DE" = x"" ]; then
   # if BROWSER variable is not set, check some well known browsers instead
   if [ x"$BROWSER" = x"" ]; then
       if [ -n "$DISPLAY" ]; then

Add chromium: (mind the colon which separates the entries) before firefox:mozilla: ... and save. To test if this were conducted successfully, type this into your terminal:

$ xdg-open

If everything went perfect, 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 mimeo, is to associate "http://" links with chromium: Template:File

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


Flash Player

If running i686 Arch Linux, all one needs to do is to install the flash plugin and restart chromium:

# pacman -S flashplugin

For x86_64, one needs to enable the new [multilib] repository.

# pacman -S flashplugin

Open PDF files inside Chromium

There are two ways to do this: The first one by using Google Chrome's own PDF rendering plugin, the second by allowing Chromium access to e. g. Adobe Reader via the mozplugger plugin. KDE users can also choose KParts Plugin and use any installed KDE application as an embedded viewer.

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 add it to the latter is using one of the packages provided in the AUR — chromium-stable-libpdf for the stable version of the browser, or for the dev version either chromium-libpdf if your Chromium package installed to Template:Filename or chromium-browser-libpdf if it installed to Template:Filename.

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

$ wget
$ wget
$ wget
$ wget

Extract the deb file with

$ ar vx <deb-file>

and fetch Template:Filename from Template:Filename in Template:Filename.

Move the file to the appropriate directory as stated above. A change of its file permissions and ownership may be necessary (the permission of should be 755).

Start Chromium and open about:plugins. "Chrome PDF Viewer" should now view; it may need to be enabled.

Note: As a new version of Chromium will not update Template:Filename it may become incompatible. Thus and with respect to possible security fixes it is advisable to update both at the same time.


To use mozplugger, install mozplugger-chromium from AUR. Follow similar instructions as described in Firefox Tweaks to set up the PDF app you wish to use with mozplugger-chromium.


To use KParts Plugin, install kpartsplugin from AUR. The plugin should be able, among other things, to open PDF files inside Chromium using an embedded Okular instance.


Chromium uses NSS for the certificate management. Actually there is no graphical user interface for NSS therefore you can use the CLI.

Tips and tricks

Controlling Memory Usage

  • Chromium offers some command-line options to help control how efficient it is with system memory, by determining how often it should release memory back to the operating system. It is done with the flag --memory-model=X, where X is either high, medium, or low. Setting it to high makes chromium never release memory. Medium makes it reduce its working set of the memory when switching tabs, and low makes it reduce its working set when switching tabs and when the browser is not actively being used. In my experience, running chromium with --memory-model=low can actually improve performance as well, though your mileage may vary. --Falcata 06:07, 26 November 2010 (EST)

Icons not shown in download tab

You may find that Chromium shows icon placeholders (icons representing broken documents) instead of appropriate icons in its download tab. The likely cause is that you have not installed a desktop environment.

Remedy this by installing Gnome icons:

# pacman -S gnome-icon-theme

Profile in tmpfs

The default Chromium profile is located in Template:Filename. This profile can be relocated to an available tmpfs filesystem, including /tmp, or /dev/shm for improvements in application response as the the entire profile is now stored in RAM. Another benefit is a reduction in disk read and write operations, of which SSDs benefit the most.

Simple bash script to automate the process

Use the following bash script to automatically move your chromium profile to /dev/shm and keep it sync'ed.




[[ ! -d $VOLATILE/cache ]] && mkdir -p $VOLATILE/cache
[[ ! -h $HOME/.cache/chromium ]] && ln -s $VOLATILE/cache $HOME/.cache/chromium
[[ -r $VOLATILE ]] || install -dm755 $VOLATILE

if [[ `readlink $LINK` != $VOLATILE ]]; then

if [[ -e $LINK/.flagged ]]; then
  rsync -a --delete --exclude .flagged $LINK/ $STATIC/
  rsync -a $STATIC/ $LINK/
  touch $LINK/.flagged

Don't forget to make it executable:

$ chmod +x $HOME/bin/sync-chromium

Call the script at login by copying the following to your $HOME/.config/autostart


[Desktop Entry]

Add a cron job to keep it updated

Manipulate the user's cron table using Template:Codeline:

$ crontab -e

Add a line to start the script every 30 minutes,

*/30 * * * * ~/bin/sync-chromium

or add the following to do so every 2 hours:

0 */2 * * * ~/bin/sync-chromium

Add an entry to /etc/rc.local.shutdown

Finally, a line to Template:Filename will keep your profile sync'ed when the machine is shutdown.

Note: Replace the word "user" with the user name of interest in the following line.
# echo "su user -c /home/user/bin/sync-chromium" >> /etc/rc.local.shutdown

Enabling experimental features

To enable experimental features of Chromium like WebGL and rendering webpages through GPU, type "about:flags" in Chromium address bar and enable features you want.

Search Engines

You can make sites like and easily searchable by first executing a search on those pages, then going to Options>Preferences>Basics and clicking "Manage" in the "Default Search" section. You can then, for example, "Edit" the Wikipedia entry and change its keyword to "w". Then, you can search Wikipedia for "Arch Linux" from the address bar by simply entering "w arch linux". "?" is a hard-coded keyword for Google search (it will behave differently from the other keywords). It allows you to easily search for things like "/bin/bash".


Default profile

If you cannot get your default profile when you try to run chromium:

$ chromium
[2630:2630:485325611:FATAL:chrome/browser/] Check failed: profile. 
Cannot get default profile. Trace/breakpoint trap

Just correct the owner of the directory Template:Filename, and it will work.

$sudo chown -R yourusername:yourusergroup /home/yourusername/.config/chromium