Did you find this article helpful?
[Guide] Play Spotify links in running client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After combining a few ideas, I got my firefox to open spotify links à la
https://open.spotify.com/track/4kLyPZvYQE2N1K2rFQ3e6a?si=sLbFkVGvS6izC2-6J74iZQ
directly in my running Linux Spotify client. Here's how:
1. Install Greasemonkey (Firefox) or Tampermonkey (Chrome) and then this script.
I modified it to not even open the web-player but directly redirect to spotify by adding the line
// @run-at document-start
in the header section of the script. I sent a request to the author to incorporate that change.
2. Create a new spotify URI handler at ~/.local/share/applications/spotify-open.desktop with the content
[Desktop Entry] Type=Application Name=Open in Spotify GenericName=Music Player Icon=spotify-client Exec=qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri %U Terminal=false MimeType=x-scheme-handler/spotify; Categories=Audio;Music;Player;AudioVideo; StartupWMClass=spotify
Make sure you have qdbus installed. On Arch Linux, this is found in package qt5-tools.
Now if you click on any open.spotify.com link, it will automatically play in your client.
Cheers,
Sebastian
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page