back to ~fox

spotify on dice

Spotify distributes its linux binaries via .deb archive (by publishing them to an apt repository), and also by the snap package manager.

The dependencies are already installed on dice, so all you need to do is grab a copy of the actual binary from somewhere.

As I am more familiar with apt, I elected to extract the binaries from the .deb archive. It's really easy to do.

extracting the spotify binary from the repository

  1. Take a look at how the repository is layed out. See here. Obviously, the source is not available, but there are binary packages for both amd64 and i386.
  2. Digging into the binary-amd64/Packages file, we can see a reference to the new (html5) client, the old client, and a couple of utility packages that probably smoothed upgrades at some point over the years.
  3. Grab a copy of the most recent spotify-client deb file. At the time of writing, this is build 1:1.0.69.336.g7edcc575-39, which can be located here. You can find the link to the most recent one by having a look at the Filename line in the Packages file.
  4. This is a deb archive. You can extract it easily with ar x spotify-client_1.0.69.336.g7edcc575-39_amd64.deb.
  5. You'll get a couple of .tar.gz files - control.tar.gz and data.tar.gz. You only need to extract data.tar.gz, which you can do with tar -xzvf data.tar.gz.
  6. That's actually all there is to it. You should be able to just run ./usr/bin/spotify

I'm sure I'm going to come across bugs, but weirdly even notifications seem to work (at least in i3). Anyway, here's a screenshot. This actually gives me a lot of hope for running similar packages (that are essentially rendering html/js) like Slack.