注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Web Browsers"

From Funtoo
Jump to navigation Jump to search
(Chromium no longer is compatible with pipelight because it dropped nsplugin support. Netflix no longer uses silverlight, so pipelight is not needed for it. Drop pipelight instructions.)
 
(5 intermediate revisions by 3 users not shown)
Line 34: Line 34:
# ##i##emerge -a google-chrome
# ##i##emerge -a google-chrome
</console>
</console>
Now, edit /usr/share/applications/google-chrome.desktop
<console>
cd /usr/share/applications
nano -w google-chome.desktop
</console>
Revise Exec=/usr/bin/google-chrome %U
To be:
Revise Exec=/usr/bin/google-chrome --no-sandbox %U
Save the edited google-chrome.desktop
Now, google-chrome launches from the menu.


== Chromium ==
== Chromium ==
Line 39: Line 49:
Chromium (<tt>www-client/chromium</tt>) is the from-source version of Google Chrome, and is a very good option for people who like Google Chrome but who want to build from source. Like most modern Web browsers, it does take a '''very long''' time to build -- up to ''several hours'' on a dual-core system, and about an hour on a 4-6 core system.  
Chromium (<tt>www-client/chromium</tt>) is the from-source version of Google Chrome, and is a very good option for people who like Google Chrome but who want to build from source. Like most modern Web browsers, it does take a '''very long''' time to build -- up to ''several hours'' on a dual-core system, and about an hour on a 4-6 core system.  


After emerging, it requires a special helper package <tt>www-plugins/chrome-binary-plugins</tt> for Adobe Flash as well as PDF viewing support.
After emerging, it requires a special helper package <tt>www-plugins/chrome-binary-plugins</tt> for PDF and widevine viewing support.


==== Advantages ====
==== Advantages ====
Line 45: Line 55:
* It is built from source, so it has fewer issues with dependencies than Google Chrome, yet it is very similar in functionality.
* It is built from source, so it has fewer issues with dependencies than Google Chrome, yet it is very similar in functionality.
* It looks great, and works well.
* It looks great, and works well.
* With an easy emerge of <tt>www-plugins/chrome-binary-plugins</tt>, it provides identical functionality to Chrome in regards to Adobe Flash and PDF support.
* With an easy emerge of <tt>www-plugins/chrome-binary-plugins</tt>, it provides identical functionality to Chrome in regards to PDF and widevine support.
* Netflix now works out of the box.
* A separate merge of www-plugins/adobe-flash is required for Adobe Flash support.


==== Disadvantages ====
==== Disadvantages ====


* It takes a very long time to build, even on a modern system, so be prepared to wait.  Even if it's building from sources, chromium build system does not provide ability to compile all features, enabled in pre-built package. For example, no native netflix (widevine plugin) support.  However it can be added with slight effort, see below. It's not supported by upstream,  a warning.
* It takes a very long time to build, even on a modern system, so be prepared to wait.  Even if it's building from sources, chromium build system does not provide ability to compile all features, enabled in pre-built package.


=== Installing Chromium ===
=== Installing Chromium ===
Line 74: Line 86:


If you like the default "blue" look of Chrome, and want Chromium to look like that, go to the hamburger ("3 bar") menu in the upper right, go to '''Settings''', and under '''Appearance''', click  '''Use Classic theme'''. Flash some gang signs to imaginary onlookers, and you are done.
If you like the default "blue" look of Chrome, and want Chromium to look like that, go to the hamburger ("3 bar") menu in the upper right, go to '''Settings''', and under '''Appearance''', click  '''Use Classic theme'''. Flash some gang signs to imaginary onlookers, and you are done.
=== Adding Support For Netflix ===
{{Warning|This is not supported by upstream.}}
Add the widevine use flag for both chromium and chrome-binary-plugins, probably easiest to just add it to "USE=" in /etc/portage/make.conf.
<console>
# ##i##install -d /etc/portage/patches/www-client/chromium
# ##i##cd /etc/portage/patches/www-client/chromium
# ##i##wget https://bugs.funtoo.org/secure/attachment/13193/version_independent_widevine.patch
</console>
You must have a local portage repository, if you do not, create one.  Here we  will assume it is /usr/local/portage.
<console>
# ##i##install -d /usr/local/portage/www-client/chromium  # (if it doesn't already exist)
# ##i##cd /usr/local/portage/www-client/chromium
# ##i##ln -s /usr/portage/www-client/chromium/files files
# ##i##wget (latest chromium ebuild version from https://bugs.funtoo.org/browse/FL-2622)
# ##i##ebuild chromium-<version>.ebuild manifest
# ##i##emerge -av chromium chrome-binary-plugins
</console>
Grab some popcorn and raisinettes, put your feet up and enjoy your netflix.
{{Note|You will have to download the latest modified ebuild from FL-2622 whenever chromium updates, the latest modified ebuild should be up within 24 hours of new release.  If you just can't wait, and the new modified ebuild isn't posted yet you can always use package.mask to hold chromium to the latest version that is posted or if you already have widevine modified chromium to hold it to the version you have until the new one is posted.}}
=== Adding Support For Netflix (pipelight) ===
{{Warning|Please compile your wine with pipelight useflag}}
Emerge www-plugins/pipelight:
<console>
# ##i##emerge -va pipelight
</console>
Install Silverlight using pipelight:
<console>
# ##i##pipelight-plugin --enable silverlight
</console>
Open Firefox and wait for a while because Silverlight will be installed. When finished, install a User Agent. There are several. I used the [https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider/?src=search User Agent Overrider].
Before opening the site Netflix, change the ID to: Mac/Safari. Then go to: http://netflix.com and enjoy your netflix.


== Firefox (binary) ==
== Firefox (binary) ==

Latest revision as of 22:49, June 11, 2021

Funtoo Linux offers a number of possibilities when it comes to Web browsers. This page is intended to give you an overview of what is available, their various trade-offs, and also provide tutorial-style instructions on how to set them up so they offer full functionality. Additionally, instructions are provided on how to set up the Oracle Java Runtime Environment for running Java applets.

Prerequisites

Before installing a Web browser, ensure that you have a functioning X environment or desktop environment set up.

Google Chrome (binary)

The Google Chrome (binary) ebuild is www-client/google-chrome. Google Chrome is a very good Web browser. This browser is a great option for those who want a full-featured browser up and running quickly without a lot of complication.

Advantages

  • It's very fast to install, because it does not need to be built from source.
  • It includes support for Adobe Flash and PDF viewing built-in, which works right away with no additional configuration.
  • It works well with PulseAudio with no additional configuration required.
  • Overall, the browser looks fantastic and is very fast.

Disadvantages

  • Included Flash does not support Amazon Video on Demand, which requires older DRM support. See Firefox as an option for this.
  • It's based on a binary for Debian systems, and sometimes depends on outdated versions of ebuilds to run.

Google Chrome Installation

As root, you first need to accept the Google Chrome license, as follows:

root # emerge google-chrome --autounmask-write

Now, run etc-update and accept the changes made to /etc/portage/package.license. Now, emerge:

root # emerge -a google-chrome

Now, edit /usr/share/applications/google-chrome.desktop

cd /usr/share/applications
nano -w google-chome.desktop

Revise Exec=/usr/bin/google-chrome %U To be: Revise Exec=/usr/bin/google-chrome --no-sandbox %U Save the edited google-chrome.desktop Now, google-chrome launches from the menu.

Chromium

Chromium (www-client/chromium) is the from-source version of Google Chrome, and is a very good option for people who like Google Chrome but who want to build from source. Like most modern Web browsers, it does take a very long time to build -- up to several hours on a dual-core system, and about an hour on a 4-6 core system.

After emerging, it requires a special helper package www-plugins/chrome-binary-plugins for PDF and widevine viewing support.

Advantages

  • It is built from source, so it has fewer issues with dependencies than Google Chrome, yet it is very similar in functionality.
  • It looks great, and works well.
  • With an easy emerge of www-plugins/chrome-binary-plugins, it provides identical functionality to Chrome in regards to PDF and widevine support.
  • Netflix now works out of the box.
  • A separate merge of www-plugins/adobe-flash is required for Adobe Flash support.

Disadvantages

  • It takes a very long time to build, even on a modern system, so be prepared to wait. Even if it's building from sources, chromium build system does not provide ability to compile all features, enabled in pre-built package.

Installing Chromium

Okay, now it's time to emerge Chromium:

root #  emerge -a www-client/chromium

This will take a long time to complete. After you're done, emerge Chrome helper programs to enable Adobe Flash and PDF viewing support. First, review and accept the license:

root # emerge www-plugins/chrome-binary-plugins --autounmask-write

Now, run etc-update and accept the changes that it made to /etc/portage/package.license. Now, emerge the plugins for real:

root # emerge www-plugins/chrome-binary-plugins

Making Chromium Look Sexier

If you like the default "blue" look of Chrome, and want Chromium to look like that, go to the hamburger ("3 bar") menu in the upper right, go to Settings, and under Appearance, click Use Classic theme. Flash some gang signs to imaginary onlookers, and you are done.

Firefox (binary)

The Firefox binary Web browser, www-client/firefox-bin is another good option. It is more feature-rich as opposed to the "lean and mean" Chrome/Chromium.

Advantages

  • Firefox is a great, full-featured Web browser.
  • It is quick to install, because it is a binary.
  • Can easily be made to support Amazon Video on Demand (Amazon Prime.)

Disadvantages

  • It works well with ALSA by default, but requires tweaks to get working with PulseAudio.
  • A separate merge of www-plugins/adobe-flash is required for Adobe Flash support.

Installing Firefox

First, emerge Firefox itself. This is quick:

root #  emerge www-client/firefox-bin

By default, Firefox does not support Adobe Flash. Let's fix this:

root #  emerge www-plugins/adobe-flash --autounmask-write

Now, run etc-update and accept the changes that Portage made to /etc/portage/package.license. Now, let's get Flash installed:

root #  emerge www-plugins/adobe-flash

To support Amazon Video on Demand, the following package needs to be installed:

root #  emerge media-libs/hal-flash

Firefox is now installed!

Firefox and Audio

   Note

This doesn't seem to be required anymore with Firefox and recent versions of PulseAudio, which can use an ALSA sink to funnel audio automagically into PulseAudio.

By default, Firefox will try to use an ALSA device for audio. To get Firefox to use PulseAudio, create an .asoundrc file in your Firefox user's home directory that looks like this:

pcm.!default 
{    type pulse
    hint.description "Default Audio Device"
}
ctl.!default {
    type pulse
}

This will route ALSA to PulseAudio by default -- I believe you may need to restart your X session to get these changes to apply.

I also recommend emerging media-sound/pavucontrol -- the PulseAudio Volume Control app. Some casual tweaking in here to set the output device for Firefox should result in audio working for you.

Firefox and gstreamer

Firefox-bin is currently compiled against gstreamer 0.10.x so if you wish to use sites like soundcloud or bandcamp without flash then you will need to have media-libs/gst-plugins-good, media-libs/gst-plugins-bad, media-libs/gst-plugins-ugly, media-plugins/gst-plugins-ffmpeg and media-plugins/gst-plugins-mad installed (version 0.10.x for all). If you are compiling firefox yourself (non -bin version) then gst-plugins 1.x versions can be used to build against.

Watching videos with embedded mpv

Mpv can be used as an embedded media player inside firefox. See mozplugger for more information.

Oracle Java Runtime Environment

Enabling a Java Runtime Environment isn't a must-have for everyone, but it's nice to have installed in case you need it. And some of us have a need to run a Java app now and again, so let's look at getting it installed. It's quite easy to get going. Now, let's emerge the Oracle JRE:

   Important

Please ensure that the nsplugin USE flag is enabled when you run emerge, below. This enables the Web browser plugin.

root # emerge -a dev-java/oracle-jre-bin

The Oracle JRE is now installed.

Running Java Applets

If your Web browser prompts you for an application to run .jnlp files, instruct it to use /opt/oracle-jre-bin-1.7.0.51/bin/javaws (also known as "Java Web Start".) You can also use javaws to run .jnlp files from an xterm.

Java and Security

Starting with Oracle JRE 1.7.0.51 and higher, Java has enhanced security settings and may refuse to run some Java applets. Normally, this is fine and good, unless you absolutely need to run an app and Java is refusing to run it. To get around this, open up an xterm as your browser user and go to the Java bin dir, and run ControlPanel as follows:

user $ cd /opt/oracle-jre-bin-1.7.0.51/bin
user $ ./ControlPanel

Now, go to the Security tab and click the Edit Site List... button. Add a URL for the site from which you are downloading the Java Applet. Now click OK and save your changes, and try running the Java applet again. It should now be allowed to run.

"Java Not Allowed" in Chrome-Based Browsers

If you load a Web page with a Java applet on it, you may see a Java logo with text underneath that says "Java not allowed". To resolve this issue, visit the following URL in your browser:

chrome://plugins

This will display a list of all plugins enabled in Chrome. You should see a plugin called something like this:

Java(TM) - Version: 10.45.2

Next Generation Java Plug-in 10.45.2 for Mozilla browsers

Check the "Always Enable" checkbox and then reload the page with the Java applet, and it should load properly.