Streaming with Linux: Spotify

spotify-qt – lightweight Spotify client

First launched in 2008, Spotify is a digital music streaming service with a freemium business model. You can listen to a huge library of music and podcasts for no charge if you are prepared to have shuffle play (with limited skips), interrupted listening and lower audio bitrate. Alternatively, there’s the option of Spotify Premium. In the UK, a subscription costs £9.99 per month for an individual account. This gives you streaming music at 320 kbps, the ability to download music, and full functionality.

Spotify provide a semi-official app for the service which uses Chromium Embedded Framework (think bloated memory footprint). But third-party clients are available for Spotify Premium users. Spotify blocks API access to their audio for non-premium members.

spotify-qt is billed as a lightweight Spotify client. As its name indicates it’s built using Qt. a cross-platform software for creating graphical user interfaces. It’s free and open source software. You’ll need a subscription to Spotify Premium to use spotify-qt.

Installation

Getting up and running takes a bit more effort than most software. It’s a somewhat convoluted process.

First, spotify-qt doesn’t, in itself, play music streams. Instead it acts like a remote control. You therefore need additional software such as spotifyd which streams music just like the official client, but is more lightweight and supports more platforms.

We tested spotify-qt in Manjaro. There are packages for spotifyd and spotify-qt in the Official Repositories (community) and AUR respectively. A snap of each is also available.

The steps we followed were:

  • Install spotifyd – the package in the Official Repositories is built with the pulseaudio plugin, so we didn’t need to build spotifyd for ourselves.
  • Install spotify-qt from the AUR. This builds the software.
  • Configure spotifyd.

We created a 3 line configuration file ~/.config/spotifyd containing our spotify account name (which is not an email address), password, as well as a line with the entry: backend = "pulseaudio". We authenticated our account once with this plain text config file, but with a token sent by Spotify, we removed our username and password from the config file. Storing sensitive information such as usernames and passwords is never a good idea.

  • From the developer dashboard at Spotify’s website we need to create a new application and add http://localhost:8888 in the Redirect URIs section. This step is explained on spotify-qt’s GitHub repository.
  • Launch spotify-qt and copy/paste our Client ID and Client Secret (from the developer dashboard). The Client ID is 32 characters, not an email address.

The developer provides an AppImage for spotify-qt. AppImage is a universal software format for distributing portable software on Linux without needing superuser permissions to install the application. AppImage doesn’t really install software. It’s a compressed image with all the dependencies and libraries needed to run the desired software.

There are also binaries available for macOS and Windows.

Next page: Page 2 – In Operation

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Memory Usage
Page 4 – Summary

Share this article

2 comments

Share your Thoughts

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