A fun afternoon during spring break.

SAGE2 on the Raspberry Pi-3

A while back, I installed SAGE2 on my original Raspberry Pi (model B – 512 MB) but it was really to underpowered to run the full blown browser. The server side with NodeJs was no problem. I still use it as picture frame at home, flipping through pictures, but it takes several seconds to swap in a new picture (HD resolution).

Here’s a small time-lapse (accelerated) video of my Pi-1 at home used as a picture frame:


I now finally received my Raspberry Pi 3, much is much snappier than the original board, with 1GB of RAM and a multicore CPU. The GPU remains the same. The main attraction is also the builtin Wireless and Bluetooth chips. It makes the setup so much easier. I found the wireless flaky on my Pi-1.

This time, installing SAGE2 was a breeze (if you’re comfortable with using a command line).


  • Download the latest Raspbian distribution (Raspbian Jessie, March 2016 – 2016-03-18) and burn it into a mico-sd card (I used a SanDisk Ultra 32GB microSDHC for $10). I forgot how small micro SD was. But 32GB should be plenty of space for lots of content.
  • Burn it into a Micro-SD card (I used a SanDisk Ultra 32GB microSDHC for $10). I forgot how small micro SD was. But 32GB should be plenty of space for lots of content.
  • Plug power and HDMI cables (I got the recommended new USB power supply, since in the past, we had issues with power when playing Pi+Camera combos).
  • I use a Logitech wireless keyboard-mouse combo for convenience, with a little USB dongle. No driver, no setup.

Here’s my Pi3 with just the power cable (white), the HDMI cable to a HD screen, and the logitech keyboard-mouse dongle on the side in one USB port:


Update the system

SAGE2 dependencies


SAGE2 dependencies

  • I didn’t bother with FFMPEG: the platform is a little underpowered to tun video in software (the omxplayer tool plays videos fine, using the Broadcom VideoCore hardware).
  • Install ‘ghostscript’, ‘imagemagick’, ‘exiftool’, ‘setcap’, ‘nss3-tools’, … similar steps to an Ubuntu installation
    • sudo apt-get install ghostscript imagemagick
    • sudo apt-get install libcap2-bin libnss3-tools
    • sudo apt-get install libimage-exiftool-perl
  • Make sure that NodeJS can access the privileged ports (80/443) as a regular user (don’t run SAGE2 as root)
    • setcap 'cap_net_bind_service=+ep' [path to node]/bin/node

Web browser

There are various browser available on the Raspberry Pi platform:

Since Chromium is an official release, it does not provide hardware rendering and video decoding. For me, it’s fine, I’m mostly interested to run fairly static 2D applications (digital signage, PDF, images, infovis applications using SVG, …). I use chromium here.


Source code

Get your copy of the SAGE2 source code:

  • cd $HOME
  • git clone –depth 1   https://bitbucket.org/sage2/sage2.git
  • cd sage2
  • cd keys && ./GO-linux && cd ..
  • [path to node]/bin/npm install
  • start the server
    • [path to node]/bin/node server.js -l


For more details, Refer to the SAGE2 installation documentation:


Finally, you can get everything running:

  • Server:
    • node server.js -l
  • Client:
    • chromium-browser
    • navigate to the URL: http://localhost/display.html?clientID=0
  • Interface
    • from your laptop, access the SAGE2 server
    • something like:
    • Drag/drop some content (PDF, images, …)
    • Remember, that videos and WebGL-based application will not work
    • Enjoy!


SAGE2 on Raspberry Pi 3
Tagged on: