How to Spotify on Debian (Stretch)

Everything about X, Gnome, KDE, ... and everything running on it

How to Spotify on Debian (Stretch)

Postby sjukfan » 2017-04-17 21:12

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.
Debian Stretch AMD64, Core 2 Quad Q9550
Debian Jessie ARM, NSLU2 Intel IXP420
Debian Sid Powerpc, PowerPC 7447a
User avatar
sjukfan
 
Posts: 364
Joined: 2010-03-01 19:39

Re: How to Spotify on Debian

Postby tynman » 2017-04-18 02:54

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
tynman
 
Posts: 30
Joined: 2016-05-03 19:48
Location: British Columbia, Canada

Re: How to Spotify on Debian

Postby sjukfan » 2017-04-18 07:52

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.
Debian Stretch AMD64, Core 2 Quad Q9550
Debian Jessie ARM, NSLU2 Intel IXP420
Debian Sid Powerpc, PowerPC 7447a
User avatar
sjukfan
 
Posts: 364
Joined: 2010-03-01 19:39

Re: How to Spotify on Debian

Postby Lysander » 2017-04-18 19:13

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.
Lysander
 
Posts: 142
Joined: 2017-02-23 10:07

Re: How to Spotify on Debian

Postby Head_on_a_Stick » 2017-04-20 05:58

“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to Spotify on Debian

Postby deborah-and-ian » 2017-04-20 06:21

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.
deborah-and-ian
 
Posts: 91
Joined: 2016-07-13 08:40

Re: How to Spotify on Debian

Postby Lysander » 2017-04-20 09:31

Head_on_a_Stick wrote:https://forums.bunsenlabs.org/viewtopic.php?id=3168


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.
Lysander
 
Posts: 142
Joined: 2017-02-23 10:07

Re: How to Spotify on Debian

Postby sjukfan » 2017-04-20 09:55

Head_on_a_Stick wrote:https://forums.bunsenlabs.org/viewtopic.php?id=3168

In the end this is almost what I do when I run it through firejail, but a flatpack version is a bit less work.
Debian Stretch AMD64, Core 2 Quad Q9550
Debian Jessie ARM, NSLU2 Intel IXP420
Debian Sid Powerpc, PowerPC 7447a
User avatar
sjukfan
 
Posts: 364
Joined: 2010-03-01 19:39


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable