Spotify Links Working in Linux

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub


if you have installed the native Linux client, just run these three commands in the terminal:

gconftool-2 -t string -s /desktop/gnome/url-handlers/spotify/command "/usr/bin/spotify -uri %s"
gconftool-2 -t bool -s /desktop/gnome/url-handlers/spotify/needs_terminal false
gconftool-2 -t bool -s /desktop/gnome/url-handlers/spotify/enabled true

To get spotify links (eg playlist links etc) to work in Linux, I found that this solution worked for me:

First you need to create a shell script that will launch spotify for you. Here is the contents of that script:


padsp wine  "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$@"

I save the script as, then I set the permissions to executable in Nautilus.

Note the padsp - if you use Pulse Audio, you need this bit, If you don’t then you can remove it. If you try it one way and it doesn’t work try it the other way.

Once that’s done there are two things you can try.

The first (which seemed to be what worked for me) is to run the following three commands in the command line.

gconftool-2 -t string -s /desktop/gnome/url-handlers/spotify/command "/home/${USER}/ %s"
gconftool-2 -s /desktop/gnome/url-handlers/spotify/needs_terminal false -t bool
gconftool-2 -s /desktop/gnome/url-handlers/spotify/enabled true -t bool

I also did the following first, though it didn’t seem to work on it’s own. I’m not sure if it is required or not:

In Firefox, go to about:config then you need to add three new config settings (by right clicking in the main area and selecting ‘New’).

Type: string Name: Value: /home/#####/

Type: boolean Name: network.protocol-handler.external.spotify Value: true

Type: boolean Name: network.protocol-handler.expose.spotify Value: false

Tags: firefoxubuntulinuxspotifyspotify linksplaylists