RPI4 - Surfing the internet

Raspberry Pi 4: Chronicling the Desktop Experience – Web Browsing – Week 4

Last Updated on July 22, 2020

This is a weekly blog about the Raspberry Pi 4 (“RPI4”), the latest product in the popular Raspberry Pi range of computers.

This week’s blog focuses on an absolutely essential desktop activity. Surfing the web. A web browser is the quintessential desktop application. Everyone needs one, and there is not a desktop Linux distribution around that does not make a web browser available.

For Linux, there’s a web browser for every need. There’s heavyweight browsers jammed with a large feature set with addons and extensions. Then there’s leaner web browsers which still offer an attractive graphical interface. And there’s lightweight browsers including console based web browsers too.

On Raspbian, there’s a single web browser that’s officially supported. It’s Chromium.

Chromium

At the time of writing, the official build built on Raspbian is Version 74.0.3729. It’s not the latest version. This release came out in 23 April 2019, and has been superseded by 75.0.3770, 76.0.3809, 77.0.3865, and 78.0.3904, so we’re missing out on a fair few improvements such as native lazy loading.

Chromium starts up quickly on the RPI4, and it’s reasonably quick to navigate. Rendering web pages is noticeably slower on the RPI4 than a less well-specced Chromebook running GalliumOS. But it’s still sufficiently nimble for light to moderate web browsing. It suffers on web sites heavily laden with JavaScript.

Smooth scrolling is enabled by default. Scrolling up and down web pages in Chromium is not particularly smooth with a weird rippling effect evident. It’s meant to animate smoothly when scrolling page content. But turning off Smooth Scrolling eliminated the rippling effect and gave a better experience.

There’s lots of options you can configure besides turning off Smooth Scrolling, available in chrome://flags.

I find that it’s worth wiping the browser cache periodically. One way is to create an alias in ~/.bashrc along the lines of

alias clean-chromium-cache=”rm -Rf ~/.cache/chromium/Default/Cache”

When you want to clean the cache, just run clean-chromium-cache. Autocomplete will reduce the number of characters you need to type, or just use a shorter name for the alias.

Chromium is a memory hog of course, but that applies on my Arch Linux box. With a few tabs and light web browsing, ps_mem reports Chromium is using almost 1GB of RAM. Even with lots of tabs open, my 4GB RAM model didn’t run into any memory problems. But you’ll probably want to run a different web browser if you’ve got the 1GB model.

I did some real-life activities with Chromium on the RPI4 such as internet shopping, reading email via Gmail, accessing Discord servers, and more besides. The experience was quite good. A big improvement compared to its predecessors.

I gave my opinion on video streaming in Chromium in my previous week’s blog. To recap, video streaming with Chromium on the RPI4 is disappointing. Given that’s a core activity when web browsing, it’s certainly a sticking point, but at least there’s various workarounds to achieve first-rate video streaming.

Some streaming services such as Netflix, Amazon Prime Video, and Spotify use the WideVine “Content Protection System”, more commonly known as DRM. If you watch to access these services, you need a WideVine plugin+browser supported integration. Unlike Chrome, Chromium doesn’t include DRM support, and it doesn’t provide WideVine support by default. So Netflix, Amazon Prime Video etc don’t work out of the box. But following the instructions at this blog together with starting Chromium with the following command lets you watch these DRM streaming services.

$ chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 6946.63.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904 Safari/537.36"

Playback is far from perfect though with DRM streams. And you can’t redirect the playback to a different media player like omxplayerGUI to make full use of the RPI4’s hardware acceleration.

Other Web Browsers

I experimented with other web browsers during the course of this week.

The most popular web browser is Chrome. Chrome is based on Chromium, but Google adds a number of proprietary, closed-source bits to their Chrome browser that Chromium lacks. Chrome is not available for the RPI4.

Vivaldi

Vivaldi is a proprietary freeware cross-platform web browser. There is Vivaldi for Linux ARM, including the RPI4. You can download a package from Vivaldi’s website. You get Vivaldi 2.9.1705.

Installing the deb package with dpkg didn’t work:

$ sudo dpkg -i ./vivaldi-stable_2.8.1664.44-1_armhf.deb

complaining that libappindicator3-1 wasn’t installed. This was easily fixed by running the command:

$ sudo apt --fix-broken install

I’m really impressed with the performance of Vivaldi. The rendering speed of web pages is slightly faster than Chromium. Streaming video from YouTube and other sites is smoother than under Chromium (but not as smooth as using omxplayerGUI in conjunction with Chromium).

Like Chromium, Vivaldi is a memory hog. With just 2 tabs, one with a running YouTube video stream, the browser consumes about 600MB of RAM. Again this isn’t a web browser for the 1GB model, but with 4GB there’s plenty of memory to have multiple tabs open, and still run other software like Mathematica, LibreOffice, and other memory heavy apps.

Playback of HTML5 proprietary media works out of the box, but I ran into a Protected Content Error when trying to view a video on Amazon Prime. The error message suggested a solution for Chrome, not Vivaldi. There’s a script sudo /opt/vivaldi/update-widevine –system that restarts the Widevine installation process. But that script doesn’t work on ARM.

Instead, visit this GitHub repository. It hosts a widevine-flash_armhf.sh script that extracts Widevine and Flash binaries for Linux ARMhf from ChromeOS recovery images. Download the script (as a zip), uncompress the zip file, change into the directory, make the script executable with chmod u+x, and run the script.

The script deposits the file widevine-flash-20191029_armhf.tgz. Run the command:

sudo tar -C/ -xf widevine-flash-20191029_armhf.tgz

Viewing Amazon Prime with Vivaldi is not perfect, but it’s watchable.

Firefox

While the days of Firefox being the number 1 web browser are long gone, it still retains a significant usage share. Raspbian’s repository hosts an ancient Firefox package. It’s version 60.9.0 ESR. That version was released nearly 2 years ago. A long way from the current supported official releases (Firefox 70.0, 68.2.0, and 68.2.0 ESR).

There’s no optimizations applied by Raspbian to Firefox. And there’s lots of sticking points using Firefox on the RPI4. For example, using Firefox to surf the web interferes with video playback. Watching a video on VLC is disrupted by scrolling a web page in Firefox. That doesn’t happen when using Chromium or Vivaldi.

For general web browsing, Firefox seems to work satisfactory in other respects. But using old versions of Firefox poses a significant security risk. So I cannot recommend using Firefox on the RPI4.

UPDATE: In Week 26, I revisit Firefox, as the Raspbian repositories offer a current version of this web browser.

Midori Browser

Midori Browser is billed as a lightweight, fast, free and open-source browser. It used to be the recommended web browser for earlier models of the Raspberry Pi. I’ve run out of time this week to fully test Midori on the RPI4. But I can say it’s a disaster for streaming video. Basic web browsing seems reasonable, and it definitely offers a smaller memory footprint to the web browsers above.

If you’ve used this web browser extensively on the RPI4, please share your comments.

Summary

I always prefer open source software to freeware. But given that I’m not satisfied with the web surfing performance of Chromium on the RPI4, and the Firefox package is prehistoric in browser terms, the best solution in my opinion is currently Vivaldi. It’s fast at rendering web pages with good (but not perfect) video playback. For video streaming, Chromium with omxplayerGUI has the edge.

Generally I prefer web browsing with a graphical interface. I’ve not tested text based web browsers for this week’s blog, but it’s certainly something I’ll investigate and post my findings in a later edition.

UPDATE: In Week 26, I revisit Firefox, as the Raspbian repositories offer a current version of this web browser.


Read all my blog posts about the RPI4.

Raspberry Pi 4 Blog
Week 36Manage your personal collections on the RPI4
Week 35Survey of terminal emulators
Week 34Search the desktop with the latest version of Recoll
Week 33Personal Information Managers on the RPI4
Week 32Keep a diary with the RPI4
Week 31Process complex mathematical functions, plot 2D and 3D graphs with calculators
Week 30Internet radio on this tiny computer. A detailed survey of open source software
Week 29Professionally manage your photo collection with digiKam
Week 28Typeset beautifully with LyX
Week 27Software that teaches young people how to learn basic computing skills and beyond
Week 26Firefox revisited - Raspbian now offers a real alternative to Chromium
Week 25Turn the Raspberry Pi 4 into a low power writing machine
Week 24Keep the kids learning and having fun
Week 23Lots of choices to view images
Week 22Listening to podcasts on the RPI4
Week 21File management on the RPI4
Week 20Open Broadcaster Software (OBS Studio) on the RPI4
Week 19Keep up-to-date with these news aggregators
Week 18Web Browsers Again: Firefox
Week 17Retro gaming on the RPI4
Week 16Screen capturing with the RPI4
Week 15Emulate the Amiga, ZX Spectrum, and the Atari ST on the RPI4
Week 14Choose the right model of the RPI4 for your desktop needs
Week 13Using the RPI4 as a screencaster
Week 12Have fun reading comics on the RPI4 with YACReader, MComix, and more
Week 11Turn the RPI4 into a complete home theater
Week 10Watching locally stored video with VLC, OMXPlayer, and others
Week 9PDF viewing on the RPI4
Week 8Access the RPI4 remotely running GUI apps
Week 7e-book tools are put under the microscope
Week 6The office suite is the archetypal business software. LibreOffice is tested
Week 5Managing your email box with the RPI4
Week 4Web surfing on the RPI4 looking at Chromium, Vivaldi, Firefox, and Midori
Week 3Video streaming with Chromium & omxplayerGUI as well as streamlink
Week 2A survey of open source music players on the RPI4 including Tauon Music Box
Week 1An introduction to the world of the RPI4 looking at musikcube and PiPackages

This blog is written on the RPI4.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Stephan Munsch
Stephan Munsch
4 years ago

Midori was renewed and relaunched some time ago, and it is far from complete. I would say it’s useable, but not more.

A recommendation can be falkon (former qupzilla), a fast browser with relatively small footprint. It’s not perfect, but my browser for 99.9% of use. I use it on a thin client and would not change.

Regards
Stephan

1kenobitoby
1kenobitoby
3 years ago

Thanks Luke. I’ve enjoyed these blog posts and found them really helpful and time saving. For anyone installing Vivaldi, there’s a small typo in the bit about the missing library. It needs another ‘minus’ in front of fix and should read:

sudo apt –fix-broken install

You can also find the library in Raspian’s Add / Remove Software before running dpkg.

1kenobitoby
1kenobitoby
3 years ago
Reply to  Luke Baker

Yeah, I see on the site mine’s rendered exactly the same as yours and if you copy and paste it, it comes out as one long dash. Hopefully it will be clear to anyone following they need to type ‘minus minus fix’.