How to listen to Spotify on Raspberry Pi

Raspbian is the number 1 operating system on the Raspberry Pi. It makes the tiny Raspberry Pi feel like a full-sized computer, allowing users to access web browsers, gadgets and even games.

But Raspbian doesn't support every existing show, and Spotify fans will be disappointed to learn that the Raspberry Pi can't play Spotify in the Chromium web browser.

Luckily, you can make a few tweaks to get Spotify working on the Raspberry Pi and play music via the choice of HDMI connectivity or headphone jack. Here's how to listen to Spotify on the Raspberry Pi.

How to listen to Spotify on Raspberry Pi

Step 1: Install Raspbian

How to listen to Spotify on Raspberry Pi Picture 1

This whole project takes place on Raspbian, so grab the disk image and put it on the microSD card. You can do this using the standard procedure for installing any operating system on your Raspberry Pi.

After installing Raspbian, you will have a great operating system that you can use to perform basic computer functions (like word processing, web browsing, etc.) or as a starting point. head for any Pi project that uses Raspbian as a base.

But one thing you won't be able to do is use the included Chromium web browser to access Spotify's web player. If you try, you will have to redirect or get a message saying 'Playback of protected content is not enabled'.

Step 2: Open Chromium and add the extension User-Agent Switcher for Chrome

You will use this utility to 'trick' the website you want to use into thinking you are running one of the supported browsers, although it is not.

Step 3: 'Pretend' is using Internet Explorer 10

Now, you just need to select your new 'user agent' before trying to access Spotify's web player. Internet Explorer 10 should work, so go ahead and do it: Navigate to Internet Explorer> Internet Explorer 10 under User-Agent Switcher for Chrome settings.

Step 4: Listen to Spotify through the headphone jack or HDMI connection

How to listen to Spotify on Raspberry Pi Picture 2

If you are satisfied with using the headphone jack, complete here! Now, the awesome Spotify doesn't know that you're using a Chromium web browser and should be fine.

By default, this project will output the audio to the Raspberry Pi's headphone jack (instead of the HDMI port), which means you'll have to plug in an extra cord or headphones to enjoy your tunes. However, everything looks perfect when connected to a larger stereo system!

If you want to use an HDMI connection instead, there's only one simple step left to do. In Terminal, run the command:

sudo raspi-config

This will give you a menu in the Terminal window. Navigate to Advanced Options> A4 Audio> Choose the audio output: 2 Force HDMI.

4.3 ★ | 16 Vote

May be interested

  • Learn Pi Imager, How to Use Raspberry Pi ImagerPhoto of Learn Pi Imager, How to Use Raspberry Pi Imager
    the raspberry pi foundation recently released a new application for recording sd cards for the raspberry pi. the new program, called raspberry pi imager, launches march 5, 2020.
  • How to install Arch Linux on Raspberry PiPhoto of How to install Arch Linux on Raspberry Pi
    luckily, there is an arch linux version designed to work with arm processors. let's see how you can install arch linux on raspberry pi through the following article!
  • How to use Raspberry Pi to monitor network with NagiosPhoto of How to use Raspberry Pi to monitor network with Nagios
    the best way to monitor networks with a raspberry pi is to use a software called nagios. nagios is like an error detection tool, it checks something as often as possible (like every 5 minutes) and warns you when this check doesn't work as expected.
  • How to use IFTTT with Raspberry PiPhoto of How to use IFTTT with Raspberry Pi
    in this article, you'll learn how to build a custom applet that you can use with the raspberry pi, including how to connect to ifttt, set up the internal webhook, and how to enable it.
  • How to install LibreELEC on Raspberry Pi 4Photo of How to install LibreELEC on Raspberry Pi 4
    the raspberry pi 4 is the most powerful piece of hardware to come from the pi platform. it has usb 3.0, more ram and faster cpu. for this reason, the pi 4 is perfect for a linux-based media player operating system like libreelec.
  • How to backup Raspberry PiPhoto of How to backup Raspberry Pi
    since the raspberry pi uses a microsd card for storage, creating a raspberry backup is pretty easy on any platform. here's how to back up a raspberry pi sd card on windows as well as how to restore the card from that backup.