Difference between revisions of "Chromium"

From ArchWiki
Jump to navigation Jump to search
m (Added a way to make Chromium the default browser.)
Line 18: Line 18:
 
Xft.hintstyle:  hintslight
 
Xft.hintstyle:  hintslight
 
</pre>
 
</pre>
 +
 +
== Default browser ==
 +
Want to make Chromium the default browser? An option is to edit the ''xdg-open'' script.
 +
$ sudo YOUR EDITOR /usr/bin/xdg-open
 +
Almost at the bottom on the file, is a long vertical list of browser;
 +
if [ x"$DE" = x"" ]; then
 +
    # if BROWSER variable is not set, check some well known browsers instead
 +
    if [ x"$BROWSER" = x"" ]; then
 +
        BROWSER=links2:links:lynx:w3m
 +
        if [ -n "$DISPLAY" ]; then
 +
            BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
 +
        fi
 +
    fi
 +
    DE=generic
 +
fi
 +
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 http://google.com
 +
If everything went perfect, either a new tab inside Chromium, or a new window would open and display the Google homepage , based on your case.
  
 
== Problems ==
 
== Problems ==

Revision as of 14:17, 9 April 2010

Chromium is a open source graphical web browser from Google.

Installing

# pacman -S chromium

Font Rendering

Google Chrome doesn't use the settings in .fonts.conf. If the fonts are rendered badly you can use xft settings as suggested here. Just create ~/.Xdefaults 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

Default browser

Want to make Chromium the default browser? An option is to edit the xdg-open script.

$ sudo YOUR EDITOR /usr/bin/xdg-open

Almost at the bottom on the file, is a long vertical list of browser;

if [ x"$DE" = x"" ]; then
   # if BROWSER variable is not set, check some well known browsers instead
   if [ x"$BROWSER" = x"" ]; then
       BROWSER=links2:links:lynx:w3m
       if [ -n "$DISPLAY" ]; then
           BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
       fi
   fi
   DE=generic
fi

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 http://google.com

If everything went perfect, either a new tab inside Chromium, or a new window would open and display the Google homepage , based on your case.

Problems

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

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

Just correct the owner of the directory ~/.config/chromium, and it will work.

$ chown -R yourusername: ~/.config/chromium

Resources