Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

Linux Spotify client 1.x now in stable

Solved!

Linux Spotify client 1.x now in stable

 

In June 2015 we released version 1.x of the client for Linux in the testing repository.

https://community.spotify.com/t5/Spotify-Community-Blog/Spotify-Client-1-x-beta-for-Linux-has-been-r...

The intention was to fix a few of the bigger issues and then quickly move this to stable. That never happened, since after September, we have had no developers working on the linux client. There are still lots of problem with this version of the client for linux, but we are now seeing much more problems with the old client.

 

Known linux specific issues in 1.0.23

 

Most of these we want to fix, but others (like missing tray icon) we probably won't. Link to threads with more issues you have and I will try to add them here. If you can't find your issue already reported, create a new thread and follow this troubleshooting guide for linux.

 

From now on, the idea is to first release a client to the testing repository as soon as possible, when it is ready internally, then after a week or so if we haven't discovered any serious new crash bug that affects lots of users, it will move to stable. Most of the time, a new linux release will have no linux specific changes, only the changes it shares with the mac and win clients.


Stable repository

To install a client from the stable repository follow the instructions on https://www.spotify.com/download/linux/

 

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

 

Testing repository

 

To install a client from the testing repository, follow the same instructions, but replace the word stable with testing.

 

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com testing non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

 

 

 

Reply
262 Replies
Marked as solution


@campiador wrote:

Spotify! From June 2015 you removed the tray icon and have not yet added it back! 

The tray icon is how a lot of users prefer to control the playback, instead of switching from the current window to a giant Spotify window! 

Can you please tell me how many Linux users are you ignoring?


Out of interest: Why don't you use the MPRIS interface? The Spotify team fixed a bug and since then it's working perfectly! 😄

On Gnome for example:

Bildschirmfoto von »2016-07-27 20-16-19«.png

 

Personally I think it is a good thing that the tray icon is gone, it's not the standard way of media control on the linux desktop.

 

Thank you Spotify for making such a great client for Linux, it works a lot better for me than the Android one, even on a tablet 🙂

@durin wrote:

@rm wrote:
Please add the "add-repository" command to the instructions in https://www.spotify.com/download/linux/. Otherwise apt-key will fail with a cumbersome error message.

sudo apt-add-repository -y "deb http://repository.spotify.com stable non-free" &&

apt-add-repository is available only on Ubuntu so that doesn't work on Debian.

 

From reading the man page for apt-add-repository my understanding is that apt-add-repository does the steps 1. and 2. from the instructions in https://www.spotify.com/download/linux/

 

The best option would be the one that Dropbox uses. It installs the key and repository in a postinst script when the downloaded .deb package is installed.

Warning: The postinst maintainerscript of the package spotify-client 
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2. 
Warning: This will BREAK in the future and should be fixed by the package maintainer(s). 
Note: Check first if apt-key functionality is needed at all - it probably isn't! 
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package spotify-client)

It looks like the repository key is now installed in the postinst script and causes these warnings in Debian


@durin wrote:
The best option would be the one that Dropbox uses. It installs the key and repository in a postinst script when the downloaded .deb package is installed.
Warning: The postinst maintainerscript of the package spotify-client 
Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2. 
Warning: This will BREAK in the future and should be fixed by the package maintainer(s). 
Note: Check first if apt-key functionality is needed at all - it probably isn't! 
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package spotify-client)

It looks like the repository key is now installed in the postinst script and causes these warnings in Debian


We install apt key and repository in postinst since about a year now. The plan was to change the installation instructions to be more like for Chrome, with just a download button to the deb file, but we never did it.

 

Do you get the same warnings for Dropbox?

 



We install apt key and repository in postinst since about a year now. The plan was to change the installation instructions to be more like for Chrome, with just a download button to the deb file, but we never did it.

 

Do you get the same warnings for Dropbox?

 


No and not for Chrome either.

Main difference between Dropbox and Chrome vs. Spotify postinst is that Dropbox and Chrome has the key installation in a function and Spotify doesn't. But that shouldn't make a difference.

 

For Chrome the postinst script has the install_keys function but it's never called. It's called from a cron job /etc/cron.daily/google-chrome and that is called at the end of the postinst script.

On Dropbox postinst the install_key function is called but it doesn't check if the key is already in the keychain; it just adds it.

 

Other difference is that Spotify is the only one that does "apt-key list" to find out if the key is already in the keychain. Chrome does "apt-key export" on their keys to see if they are already in the keychain. I'm not sure but "apt-key list" could be the reason for the warnings.

 

And you should add postrm script to remove the key. 


@schuhumi wrote:

@campiador wrote:

Spotify! From June 2015 you removed the tray icon and have not yet added it back! 

The tray icon is how a lot of users prefer to control the playback, instead of switching from the current window to a giant Spotify window! 

Can you please tell me how many Linux users are you ignoring?


Out of interest: Why don't you use the MPRIS interface? The Spotify team fixed a bug and since then it's working perfectly! 😄

On Gnome for example:

 

Personally I think it is a good thing that the tray icon is gone, it's not the standard way of media control on the linux desktop.


https://extensions.gnome.org/extension/55/media-player-indicator/


@durin wrote:


Do you get the same warnings for Dropbox?

 


No and not for Chrome either.

... 

And you should add postrm script to remove the key. 


I have to figure out how to not get warnings and fix it. Maybe adding some dependencies fixes it. Thanks for your digging.

 

I don't want to remove the key in postrm. It doesn't really hurt to leave the key and if I remove it, I have to remove the sources list row for the spotify repository, otherwise you will get even worse warnings on apt-get update. That is much harder to do without messing up. And it will be very confusing for people who for some reasons wants to reinstall and then they can't. Also, right now, there is only one package in the repository, but what if there were more than one. When should you remove the repository? When you delete one package, all packages?

 

One thing is clear. That warning is a good one. You are not really supposed to mess with apt-key on package install.

 

jooon wrote: 

One thing is clear. That warning is a good one. You are not really supposed to mess with apt-key on package install.

 


What if instead of calling the apt-key from the postinst script and adding the key to the /etc/apt/trusted.gpg keychain you install the key as a separate file in to /etc/apt/trusted.gpg.d/spotify.pgp


@durin wrote:
What if instead of calling the apt-key from the postinst script and adding the key to the /etc/apt/trusted.gpg keychain you install the key as a separate file in to /etc/apt/trusted.gpg.d/spotify.pgp

Sounds like a good idea. I remember I thought about doing that before, but then used apt-key directly. I don't remember however why I changed my mind.

 

@jooon

Regarding packaging, have you looked at flatpak? There is already a proof of concept for setting up a repository here: https://github.com/alexlarsson/spotify-app/

 

It worked flawlessly for me on Fedora. Maybe that could at least solve some of your packaging isues since youcould then more easily target a stable set of libraries?

 

Sorry if this has been asked before, but I couldn' find a way to search this thread.


@kigurai wrote:

@jooon

Regarding packaging, have you looked at flatpak? There is already a proof of concept for setting up a repository here: https://github.com/alexlarsson/spotify-app/

 

It worked flawlessly for me on Fedora. Maybe that could at least solve some of your packaging isues since youcould then more easily target a stable set of libraries?

 

Sorry if this has been asked before, but I couldn' find a way to search this thread.


I've been following flatpak itself with interest. It seems like a good option. I've only glanced at the repo above, not tried it. It will require work to integrate into our build/package pipeline and setup up a new distribution endpoint, but I definitely want to do it, when I have time.

That would be awesome!

 

Maybe you can sell the idea to whoever decides how you spend your working hours if you point out that this would allow Spotify to show up in the "software center" for a quite large part of the Linux desktop eco system. 😉

Of course you can do it in Debian. Only you need install the package: software-properties-common

  

And you can use apt-add-repository

Ah man - Finally decided to get a subscription to Spotify and the first thing I find about the Linux client is this thread!

 

Again, another management discussion, but why not open source the parts you can? That way the proprietary streaming part can be maintained at far less cost, and you'll get loads of committers on the github repo (or equivalent).

 

Just a thought.

I have a premium subscription and am dying for the day i can control via the tray again.

 

Whicever idiot decided to drop this feature should really be fired.

 

Hire a proper developer. I'm sure the amount you earn from Linux premium users is more than enough to cover at least one guy. 

Just for the record, I did end up stopping my premium subscription (and I don't use the free version), largely due to a disappointment in Linux support. The alternatives to Spotify have even worse Linux support, though, so I've been sticking to buying MP3s directly for now. 

 

I'm making this post so that someone can point to it and say "yes, poor/incomplete Linux support is losing us at least this one customer".

 

For the record, I also don't like the design of the new version, either (column selection is wonky). The old one was more compact and it had the information I wanted more accessibly.


@Cxpher wrote:

I have a premium subscription and am dying for the day i can control via the tray again.

 

Whicever idiot decided to drop this feature should really be fired.

 

Hire a proper developer. I'm sure the amount you earn from Linux premium users is more than enough to cover at least one guy. 


Spotify supports MPRIS, which is the Linux Desktop protocol for media control. If your Desktop doesn't offer an interface for media control blame the desktop, Spotify has done every thing as right as one can do. Turning away from a crude custom solution, and turning to the clean and solid standard. This is what it looks on Gnome for example:

 

Bildschirmfoto von »2016-11-22 22-22-12«.png

 

 

Read the posts in this thread. That's now how people want to control the application as a rule of thumb. There are other apps that offer tray functionality on top of MPRIS. So that's not a valid reason to remove functionality when it was there to begin with.

Hello,

 

There is a major issue with login recently. This is talked here:

https://bbs.archlinux.org/viewtopic.php?id=220731 and https://aur.archlinux.org/packages/spotify/

 

It looks like this issue was introduced with the release 1.0.45.186.

 

I hope it will help jooon or someone at Spotify to track down this issue (seen for both Linux & Mac).

Are you planning to continue developing for linux or maybe users should find an alternative? 


@natanielcz wrote:

Are you planning to continue developing for linux or maybe users should find an alternative? 


Yes, the plan is to continue to release new versions of the linux client at roughly the same pace as the mac/win clients are released. Specific development regarding linux only features/bugs are also still continuing, but slower than for mac/win.

 

I think the most viable alternative is the web player, but it lacks features that the desktop client has, so for some users, it is not good enough. This client also continues to be developed and since it is a web player, it shares even more features across mac/win/linux.

 

There is also currently a library called libspotify that can be used on Linux to build alternative clients, but it has been deprecated for years and has even been removed from the website now. It is possible, but not very easy to write a good alternative client using this library. It is also hard to distribute an alternative open-source music streaming client using this library.

 

A new library that replaces libspotify has been announced, but it has not been released yet:

 

https://developer.spotify.com/technologies/libspotify/

 

"Please note that we have removed the LibSpotify binaries from our website in an effort to phase out the usage of this deprecated library. LibSpotify has been considered deprecated since 2015 and will be shut down in 2017, so we want to ensure that all developers’ efforts and attention are focused on newer and better APIs that we actively support and maintain. These APIs include the Web API, iOS and Android SDKs, and upcoming embedded libraries for Windows, Mac OS X and Linux. More information regarding upcoming libraries will be provided in the coming months."

Suggested posts