Software Setup

Monsur Hossain edited this page Apr 24, 2015 · 3 revisions
Clone this wiki locally

This will guide you through the steps for installing sonos-now-playing on a new Raspberry Pi.

Install Raspbian

Update Raspbian using sudo apt-get update && sudo apt-get upgrade

Run raspi-config and enable SSH as well as boot-to-gui

Install node and npm. The instructions below are from from

sudo su -
cd /opt
tar xvzf node-v0.10.28-linux-arm-pi.tar.gz
ln -s node-v0.10.28-linux-arm-pi node
chmod a+rw /opt/node/lib/node_modules
chmod a+rw /opt/node/bin
echo 'PATH=$PATH:/opt/node/bin' > /etc/profile.d/

Install global prereqs

npm install -g grunt
npm install -g grunt-cli
npm install -g nodemon

Install sonos-now-playing

git clone
cd sonos-now-playing
npm install

Install Chromium

sudo apt-get install chromium

Update the paths in bin/autostart and bin/ (if necessary).

Copy bin/autostart over /etc/xdg/lxsession/LXDE-pi/autostart

Screensaver config

The app can be configured to power off the screen after 15 minutes. In order to get this to work, the server needs to be able to call the and shell scripts. I took a few liberties to make this work. This probably isn't the best practice security-wise, but it works.

Make the tvservice and chvt tools suid:

chmod u+s /opt/vc/bin/tvservice
chmod u+s /bin/chvt

Grant execute permissions to the two shell scripts:

chmod 755 ./bin/
chmod 755 ./bin/