Announcements

"Open in desktop app" not working

Solved!

"Open in desktop app" not working

Device

Dell XPS 15 9560

Operating System

Kernel version: 4.19.79-1-MANJARO 64bit

Distribution version: Manjaro Linux 18.1.1
DE: KDE Plasma 5.16.5

Spotify desktop app version: 1.1.10.546.ge08ef575

Brower used: Firefox and Chrome

My Question or Issue

"Open in desktop app" is not working. When I try to open a particular playlist in my desktop application from a browser, it opens a new instance and then shows the front page, nothing related the playlist I was trying to open from my browser appears.

Screenshot_20191020_133457.png
Reply

Accepted Solutions
Marked as solution

Hey @PIlarGomez and @o1ukbmgmlyh8i1p 

 

In order to get Spotify clients to show what you wanted them to open, you will need to edit the configuration file.

 

For Snap, you shall edit the following file:

/var/lib/snapd/desktop/applications/spotify_spotify.desktop

and you'll edit the line that begins with 'Exec='. Go to the end of it and replace %U with --uri=%U

Save changes, restart Spotify.

 

For .deb installs the config file (named spotify.desktop) should be somewhere in usr/share/spotify. You need to do the same change in that file as well.

 

Now Spotify links should open spotify desktop client, displaying the playlist/artist/album you wanted to see.

 

Let me know how you get on 🙂

SebastySpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

View solution in original post

6 Replies

I am having the exact same problem. It is rather annoying

System: Ubuntu 20.04 LTS

Gnome version: 3.36.3

Window system: X11

Spotify version: 1.1.46.916.g416cacf1

Browser: tried with Chrome and Chromium

 

Marked as solution

Hey @PIlarGomez and @o1ukbmgmlyh8i1p 

 

In order to get Spotify clients to show what you wanted them to open, you will need to edit the configuration file.

 

For Snap, you shall edit the following file:

/var/lib/snapd/desktop/applications/spotify_spotify.desktop

and you'll edit the line that begins with 'Exec='. Go to the end of it and replace %U with --uri=%U

Save changes, restart Spotify.

 

For .deb installs the config file (named spotify.desktop) should be somewhere in usr/share/spotify. You need to do the same change in that file as well.

 

Now Spotify links should open spotify desktop client, displaying the playlist/artist/album you wanted to see.

 

Let me know how you get on 🙂

SebastySpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Works like a charm! Thanks a lot @Sebasty!

This didn't work for me, but I decided to look for other spotify.desktop files. On my Debian install the spotify.desktop file to edit was in /usr/share/applications

 

Edit: This only works when Spotify desktop is not yet running. If Spotify is already running, a second instance of the client will open and you'll get a big 'Something went wrong. Try reloading the page' warning. Clicking the 'Reload Page' button doesn't do anything (keeps the warning active).

Using comments from https://community.spotify.com/t5/Desktop-Linux/Guide-Play-Spotify-links-in-running-client/td-p/46473... the fix for the issue in my previous post would be to change the Exec command to:

 

dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.OpenUri string:'%U'

 

It works as you mentioned. If the app is not running, it opens and show the album/song. The problem is when the app is open.

BTW, spotify link also open a spotify page on browser with the album/song. Is it possible to only open in app the links?

Suggested posts