Hardware accelerated WebView for Raspberry Pi

And actually usable web browser for touchscreen

Penk Chen
2 min readMay 2, 2016

TL;DR: If you have the 7" touchscreen for Raspberry Pi, and want to use a touch friendly hardware accelerated web browser, go download this:

Copy onto the SD card of your Pi 2/3, then execute:

sudo service lightdm stop
sudo tar xvpf oxide-eglfs-rpi.tgz -C /
sudo rm -f /opt/oxide/.started
/opt/oxide/start.sh

What?

I’ve built Qt 5.6 with eglfs-brcm QPA, and wanted to see how web renderer works on frame buffer. Currently there are three solutions in Qt world:

  • The old QtWebKit 5.6, which is no longer supported
  • Shining new QtWebEngine, but you have to figure out a way to cross-compile it, and
  • The WebView component used in Ubuntu Phone, Chromium based Oxide

To me the choice of Oxide is obvious: they merged my patch for EGLFS and there are prebuilt armhf packages, you just have to add some dummy .so files to workaround a few undefined symbol error on Raspbian.

How?

So the tarball consists of three things:

  • the frame buffer enabled Qt 5.6
  • the binary packages of Oxide WebView, and
  • my very own touch-friendly web browser SlateKit Shell that’s been secretly developed in the past two years:

There’s side-tab support, and a very simple virtual keyboard. Since we’re using Oxide, we get some nice touch friendly features for free, like pinch to zoom and kinetic scrolling:

If you want to have a kiosk, simply modify /opt/oxide/start.sh and point to /opt/oxide/webview.qml will just do.

What’s next?

I’m looking into the recently open sourced Qt Virtual Keyboard and hope to bring more features (like WiFi management and lock screen) from SlateKit onto Raspberry Pi. Please have a look, play with it and let me know how you think.

--

--

Penk Chen

(自稱) 網紅工程師╱數位藝術家,現旅居東京。長大以後的夢想是開一家玩具店、賣自己做的玩具。