Spotify Links in Chrome on Linux/KDE

Short tip on how to get this to work:

Create a script /path/to/spotify_open.sh with the following in it:

#!/bin/bash
wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1"

Create $HOME/.kde4/share/kde4/services/spotify.protocol with the following in it:

[Protocol]
exec=/path/to/spotify_open.sh "%u"
protocol=spotify
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false

That’s it, spotify:blah style URLs will now open in Spotify launched through Wine. Chrome just uses xdg-open for launching external apps.

4 thoughts on “Spotify Links in Chrome on Linux/KDE

  1. You should use Chromium, i think that is the best alternative in this moment. Install and go to “System settings -> Default applications -> Web browser ” select option “in the following browser” with this command: “chromium-browser %u” (without quotes) for me works fine

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>