Spotify makes it easy to share playlists between users. And websites like www.spotifylist.com help you find playlists from people you don’t know.
By default, the Linux version of Spotify doesn’t add the necessary url-handlers to let you simply click on Spotify URLs on the internet and launch them automatically.
Modern distributions will send urls to xdg-open which on a GNOME desktop, in turn, uses gnome-open to try and launch the correct default application.
Typing the following lines in a terminal will make sure you’re good to go.
gconftool-2 -t string -s /desktop/gnome/url-handlers/spotify/command 'spotify -uri "%s"' gconftool-2 -s /desktop/gnome/url-handlers/spotify/enabled true -t bool gconftool-2 -s /desktop/gnome/url-handlers/spotify/needs_terminal false -t bool
You can confirm that these have been set correctly in gconf-editor.
And you can test the set up from the terminal like this:
Found on ubuntuforums.org here (from user fresta):
Create (as root) a file “/usr/share/applications/spotify-uri.desktop” (or as a user “~/.local/share/applications/spotify-uri.desktop”) with:
[Desktop Entry] Name=Spotify GenericName=Spotify Comment=Listen to music using Spotify Icon=spotify-linux-512x512 TryExec=spotify Exec=spotify -uri %u Terminal=false Type=Application Categories=Qt;AudioVideo MimeType=x-scheme-handler/spotify NoDisplay=true
And then run:
This has worked for people who had no luck with the gconf keys method, and should work on non-GNOME desktops too.