Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to Spotify on Debian (Stretch)

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
sjukfan
Posts: 386
Joined: 2010-03-01 19:39

How to Spotify on Debian (Stretch)

#1 Post by sjukfan »

No Spotify for you, Debian
After tearing at my non-existing hair for a couple of days I've figured out that Spotify's new web interface uses html5 and DRM, and you need a browser that supports this to play it. Firefox seems to download something when you turn on DRM (preferences->Content->Play DRM content) and Chrome is compiled with proprietary codecs turned on. Chromium, and browsers using QtWebEngine that is based off of Chromium, does not support this.

The bright side
Now for the bright side, if you use Chromium or a browser like QupZilla using QtWebEngine you can snatch

Code: Select all

libwidevinecdmadapter.so
libwidevinecdm.so
from the Chrome installer and then put them in /usr/lib/chromium. This might also allow you to watch Netflix and similar sites in Chromium.

The ugly side
The alternative is to get libssl1.0.0 from Jessie Backports and install the native Linux client but then you're using an old lib, and it might give weird bugs because you're not supposed to. An alternative is to get libcrypto.so.1.0.0 and libssl.so.1.0.0 from libssl1.0.0, put them in the same directory as spotify, remove libssl1.0.0 from /var/lib/dpkg/status, pin spotify-client, and start it with

Code: Select all

env LD_LIBRARY_PATH=/usr/share/spotify /usr/share/spotify/spotify
That's also pretty wrong but... meh. At least the old files are only accessed by spotfy.

Edit: Copying the files from the Chrome installer also works in QupZilla and should work with all browsers using QtWebEngine.
Last edited by sjukfan on 2017-05-05 18:15, edited 5 times in total.
Bullseye amd64, AMD Ryzen 5 3600
Buster amd64, Intel Xeon E3-1240 v3
Sid ppc, PowerPC 7447a
Sid ppc64, PowerPC 970FX

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: How to Spotify on Debian

#2 Post by tynman »

I just installed the Spotify app this past weekend. I didn't backport anything.

1. Created file spotify.list in /etc/apt/sources.list.d directory
2. Added text
deb http://repository.spotify.com stable non-free
to the spotify.list file
3. Run

Code: Select all

sudo apt install spotify-client
I have almost no experience with Spotify, so maybe I'm missing some nuance, but it seems to work OK.

System details:
Kernel: 3.16.0-4-amd64 x86_64 (64 bit)
Distro: Debian GNU/Linux 8

User avatar
sjukfan
Posts: 386
Joined: 2010-03-01 19:39

Re: How to Spotify on Debian

#3 Post by sjukfan »

tynman wrote:I just installed the Spotify app this past weekend. I didn't backport anything.
Yes, your completely right. Just me being testing centric :-) If you're running Debian Jessie you just add the Spotify repository because Jessie still has libssl1.0.0.
Bullseye amd64, AMD Ryzen 5 3600
Buster amd64, Intel Xeon E3-1240 v3
Sid ppc, PowerPC 7447a
Sid ppc64, PowerPC 970FX

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: How to Spotify on Debian

#4 Post by Lysander »

tynman wrote:I just installed the Spotify app this past weekend. I didn't backport anything.

1. Created file spotify.list in /etc/apt/sources.list.d directory
2. Added text
deb http://repository.spotify.com stable non-free
to the spotify.list file
3. Run

Code: Select all

sudo apt install spotify-client
I have almost no experience with Spotify, so maybe I'm missing some nuance, but it seems to work OK.

System details:
Kernel: 3.16.0-4-amd64 x86_64 (64 bit)
Distro: Debian GNU/Linux 8
I tried this and it appears to work initially, though after a while Spotify disappears from the favourites and search and gives this error when launched in the terminal

Code: Select all

[0418/210029:ERROR:sandbox_linux.cc(343)] InitializeSandbox() called with multiple threads in process gpu-process. 
[0418/210036:ERROR:ffmpeg_demuxer.cc(1510)] OnReadFrameDone result=-541478725 IsMaxMemoryUsageReached=0
Such a mess, and I've been trying to fix it all day.

EDIT: After doing a full upgrade the above issue seems to have disappeared in 1.0.49.125.g72ee7853 - still has to be launched from the terminal but that's not an issue.

Also, anyone reading this topic in the future may be interested to know that the Spotify web player appears to have been greatly improved and works without Flash. On the Spotify forums the devs were saying only three weeks ago they were rolling out an HTML5 version, and this seems to have been implemented.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to Spotify on Debian

#5 Post by Head_on_a_Stick »

deadbang

deborah-and-ian
Posts: 182
Joined: 2016-07-13 08:40

Re: How to Spotify on Debian

#6 Post by deborah-and-ian »

Could you please edit your first post so that people immediately know you are coming across these problems on Testing and not Stable? A simple addition of "Testing" or "Stretch" in the title would be enough. Thank you.
Debian GNU/Linux 9 Stretch w/Openbox

Acer Aspire E5-521G
AMD A8-6410 APU
4 GB RAM
integrated AMD Mullins
dedicated AMD Hainan Radeon R5 M240 2 GB
240 GB Toshiba Q300 SSD
Realtek RTL8111/8168/8411 ethernet
Qualcomm Atheros QCA9565 wireless

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: How to Spotify on Debian

#7 Post by Lysander »

Can anyone confirm success with this? I am wary to do so.

On another note, as a Spotify alternative, I can confirm Google Music works flawlessly.

https://www.linuxbabe.com/multimedia/go ... top-player

Spotify web player is causing problems again. Now it seems to have reverted to Flash. Very strange.

User avatar
sjukfan
Posts: 386
Joined: 2010-03-01 19:39

Re: How to Spotify on Debian

#8 Post by sjukfan »

In the end this is almost what I do when I run it through firejail, but a flatpack version is a bit less work.
Bullseye amd64, AMD Ryzen 5 3600
Buster amd64, Intel Xeon E3-1240 v3
Sid ppc, PowerPC 7447a
Sid ppc64, PowerPC 970FX

Post Reply