Getting Spotify to run on Gentoo/Linux: A Gross and Cruel Hack

Spotify is a great way to listen to music. Unfortunately the official client only runs on Windows and Mac machines. There is an experimental unsupported client for linux, however it’s provided as a DEB (ubuntu/debian) package.

Here’s a gross hack for whom is desperate to get it working on Gentoo.

Step 1 : Get the package

You can download the package from here.
Pick the package matching your own architecture.

Step 2 : Convert the DEB package and extract it

Install the package deb2targz if you don’t already have it.

The following command will create a tar.gz file from the .deb package :

deb2targz spotify-client-qt_0.6.2.291.gcccc1f5.116-1_amd64.deb

You can then extract that tar.gz file like below :

tar zxvf spotify-client-qt_0.6.2.291.gcccc1f5.116-1_amd64.tar.gz

This will create you a usr directory, containing spotify files.

Toss them at the appropriate places on your system :

cd usr
mv bin/spotify /usr/bin/
mv share/pixmaps/* /usr/share/pixmaps/
mv share/spotify/ /usr/share/

Step 3 : Fixing library issues

Now this is the ugly part. Spotify is linked against specific versions of some libraries (SSL 0.9.8 and Crypto 0.9.8). In order to make it work, you need to fake those versions by creating a symlink from the wanted version to the existing (you’ll need to figure this out) version in your system.

cd /usr/lib
ln -s libssl.so.1.0.0 libssl.so.0.9.8
ln -s libcrypto.so.1.0.0 libcrypto.so.0.9.8

Step 4 : Instructing firefox to open the spotify protocol with the Spotify application

You need to register the spotify protocol so that Firefox will know how to deal with those “spotify:” urls.

  1. Open the about:config page
  2. Create a boolean value by the name of network.protocol-handler.expose.spotify
  3. Set its value to false
  4. Click on a spotify link (for example a playlist link or such). A popup will open and ask you to pick an application. Use /usr/bin/spotify.

That’s it. All set.
I’m not proud of it…. but I wanted to use Spotify badly 🙂