Spotify links in Linux

When using Spotify in Linux there’s one thing that doesn’t work out of the box, the spotify links to songs and playlists. Fortunately getting them to work is actually very simple, at least in Gnome. You just need to issue these three commands as the superuser:

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

After issuing these commands the links should work everywhere.

Update 23.2.2012:

In Gnome3 you need to modify the /usr/share/applications/spotify.desktop file.

Change Exec to:

Exec=spotify -uri %u ""

and add MimeType to the file:


After making the changes, run “update-desktop-database -q” as root and the spotify links work once again.