Our blog
Spotify Links Working in Linux
Update:
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:
-
#!/bin/bash
-
-
padsp wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$@"
I save the script as spotify.sh, 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}/spotify.sh %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: network.protocol-handler.app.spotify
Value: /home/#####/spotify.sh
Type: boolean
Name: network.protocol-handler.external.spotify
Value: true
Type: boolean
Name: network.protocol-handler.expose.spotify
Value: false
More Reading:
5 Comments
|
The last line in your gconftool update is corrupt (truncated) |
|
fixed - thanks |
|
Tommi November 18th, 2010 |
I have a the linux preview client, I copy pasted those 3 commands and even did the firefox config tricks... still no go. |
|
Max Williams January 31st, 2012 |
You say this is for the Linux spotify client but your bash script seems to be referring to the wine-installed version. Is that right? |
|
The bit above the dashed line (Update) is referring to the native client The bit below the dashed line is referring to the Wine version which was the only way of doing this when we wrote this article |
RSS Feed
Andreas Jonsson
September 18th, 2010