Spotify client

Latest Spotify client re-packaged from the Ubuntu packages for supported Fedora and RHEL/CentOS distributions.spotify-client

Package information

This package tries to comply as maximum to the Fedora Packaging Guidelines; this means the packages has debuginfo packages, default Fedora’s GCC compile time options (where possible) and standard locations for binaries, data and docs.

The provided client is binary only and compiled for Ubuntu, so the Fedora package de-assembles the original Ubuntu package and moves all files in the appropriate places. The Spotify client requires assets (icons, data packages, etc.) from where its run, so I’ve left them in its own folder and just linked the icons to the system path.

The client itself is linked to an old Ubuntu OpenSSL 1.0.0 library and dynamically loads the FFmpeg libraries required for local files playing from the system path. To overcome this, and avoid problems with Steam which also bundles OpenSSL 1.0.0, I’ve removed the RUNPATH from the binaries and put everything in its own folder using an LD_LIBRARY_PATH override; so there are no conflicting libraries anywhere.

$ cd /usr/lib64/spotify-client
$ ls -alghs lib*
   0 lrwxrwxrwx. 1 root   23 Mar  1 19:21 libavcodec.so.53 -> libavcodec.so.53.61.100
6.7M -rwxr-xr-x. 1 root 6.7M Mar  1 19:21 libavcodec.so.53.61.100
   0 lrwxrwxrwx. 1 root   24 Mar  1 19:21 libavformat.so.53 -> libavformat.so.53.32.100
1.2M -rwxr-xr-x. 1 root 1.2M Mar  1 19:21 libavformat.so.53.32.100
   0 lrwxrwxrwx. 1 root   22 Mar  1 19:21 libavutil.so.51 -> libavutil.so.51.35.100
136K -rwxr-xr-x. 1 root 134K Mar  1 19:21 libavutil.so.51.35.100
 84M -rwxr-xr-x. 1 root  84M Feb 23 11:09 libcef.so
1.8M -rwxr-xr-x. 1 root 1.8M Mar  1 19:23 libcrypto.so.1.0.0
   0 lrwxrwxrwx. 1 root   23 Mar  1 19:21 libpostproc.so.52 -> libpostproc.so.52.0.100
 96K -rwxr-xr-x. 1 root  96K Mar  1 19:21 libpostproc.so.52.0.100
396K -rwxr-xr-x. 1 root 393K Mar  1 19:23 libssl.so.1.0.0
   0 lrwxrwxrwx. 1 root   24 Mar  1 19:21 libswresample.so.0 -> libswresample.so.0.6.100
 36K -rwxr-xr-x. 1 root  36K Mar  1 19:21 libswresample.so.0.6.100
668K -rwxr-xr-x. 1 root 666K Mar  6 10:26 libwidevinecdmadapter.so
$ rpm -qa spotify\*
spotify-client-1.0-13.fc25.x86_64
spotify-ffmpeg-0.10.16-3.fc25.x86_64
spotify-openssl-1.0.0t-3.fc25.x86_64

Instead of bundling Ubuntu’s OpenSSL 1.0.0 and FFmpeg, it uses the spotify-openssl and spotify-ffmpegpackages from the same repository. Those are compiled with minimum options and settings, so they can be installed on a plain Fedora or CentOS/RHEL system without any external dependency.

Starting from Fedora 25, adding this repository to your system makes the Spotify client appear also in Gnome Software.

gnome-software-spotify

Installation

To install the repository on a supported Fedora 22+ distribution, run as root the following command:

dnf config-manager --add-repo=http://negativo17.org/repos/fedora-spotify.repo

To do the same on CentOS/RHEL:

yum-config-manager --add-repo=http://negativo17.org/repos/epel-spotify.repo

Then, to install the client and its data files, perform the following command:

# yum -y install spotify-client

Spotify Connect configuration

The package includes the required service definitions for FirewallD. If you have installed a default desktop, FirewallD should be your firewall solution. Spotify Connect uses TCP and UDP port 57621 for switching and syncing playback across devices and port 57622 for syncing local files that are part of a playlist between devices that are connected to the same network.

To make sure that Spotify can listen on the required ports through your firewall software, execute the following commands as root. After installation of the package you should be able to see the word “spotify” by running:

firewall-cmd --get-services | grep spotify

Then get the firewall zone you are in, and enable the service for it. For example, on my system, to get the firewall zone I’m using:

# firewall-cmd --get-active-zones 
public
  interfaces: em1

Then enable it permanently (i.e. at reboot) and immediately with these commands:

firewall-cmd --zone=public --add-service=spotify --permanent
firewall-cmd --zone=public --add-service=spotify

Now start up Spotify and you should see all the available devices in your network.

If you don’t have SSDP (Simple Service Discovery Protocol) already enabled on your system, you also need to enable it. Paste the following XML file in /etc/firewalld/services/ssdp.xml:

<?xml version="1.0" encoding="utf-8"?>
<service version="1">
  <short>Multicast SSDP (upnp)</short>
  <description>Simple Service Discovery Protocol for advertisement and discovery of network services and presence information.</description>
  <port protocol="udp" port="1900"/>
  <destination ipv6="ff02::c" ipv4="239.255.255.250"/>
</service>

Then run the following commands, with the same zone you have used above:

firewall-cmd --reload --quiet
firewall-cmd --zone=public --add-service=ssdp --permanent
firewall-cmd --zone=public --add-service=ssdp

Bugs

Just open an issue to the specific package on Github.

272 thoughts on “Spotify client

  1. Thanks a lot. Now that the web player is useless (although it no longer uses Flash, which is its only redeeming quality) this is a godsend.

  2. I got an issue with compat-openssl, I can’t use this if I wanna play certain games, dunno if this happens with all Feral Games (devs porting games for Linux, like Mad Max and Deus EX), but AFAIK Mad Max is giving my trouble if I have compat-openssl, I need to remove it, so the game uses the other version of openssl available.

    Any words on how I can manage to keep Spotify and the game running with out removing compat-openssl? ’cause of course that deletes Spotify.

    1. Will look into it. I guess I need to modify it somehow and skip it from the library paths or Steam games will use that.

    2. Hello, I’ve made the OpenSSL 1.0.0t compatibility library a private library in Spotify’s own folder that the client then loads through its run path. There should be no more issues of Steam games compiled for the Ubuntu Runtime loading my custom library. It will be online in a few minutes.

    1. I had this same problem, but I found a work-around to get to settings by going to the “Local Files” section on the left under “Your Music” then “Go to Preferences” in the middle of the screen. I don’t know what’s causing it but at least there is a work-around.

  3. hello,these steps could help you all.
    — Open spotify
    –Click Log in with facebook
    –I had to open one more tab with facebook in it obviously already logged, try it until you get the message “you can close this window”
    –After because the spotify’s window will not go in, close the window and open again spotify.

    Linux, Fedora 25, spotify-client

    1. Fixed the problem for me too. Thanks for taking the time to write down the solution šŸ™‚
      I hope negativo17 won’t struggle to fix it (Great work by the way!)

    1. Same setup as here (X + binary drivers on Fedora 25), but sorry it doesn’t happen. Unfortunately the client is a horrible binary blob with no chance for me to do anything.
      I guess there is something wrong when the client starts fresh (i.e. no previous configuration) on Fedora 25.

        1. Ok, searching in internet I found this error depends by spotify client version 1.0.45.182.
          With previous version 1.0.44.100 it’s all ok.

          Problems appears with a fresh spotify client installation and not with an upgrade from an older version.

          So, can you rebuild a package with 1.0.44.100 stable version so we can upgrade later to 1.0.45.182?
          Or we can waiting for a new version that fix this problem?

          Thanks

  4. Hi,
    Try to install spotify-client in my fresh Fedora 25 Workstation. Launch spotify open login page, but when i try to login it crash!
    This is the output in the terminal:
    [code]
    spotify: /lib64/libssl.so.1.0.0: no version information available (required by spotify)
    spotify: /lib64/libcrypto.so.1.0.0: no version information available (required by spotify)
    spotify: /lib64/libcurl.so.4: no version information available (required by spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libssl.so.1.0.0: no version information available (required by /usr/lib64/spotify-client/spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libcrypto.so.1.0.0: no version information available (required by /usr/lib64/spotify-client/spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libcurl.so.4: no version information available (required by /usr/lib64/spotify-client/spotify)
    [1218/104331:ERROR:main_delegate.cc(752)] Could not load cef_extensions.pak
    /proc/self/exe: /lib64/libssl.so.1.0.0: no version information available (required by /proc/self/exe)
    /proc/self/exe: /lib64/libcrypto.so.1.0.0: no version information available (required by /proc/self/exe)
    /proc/self/exe: /lib64/libcurl.so.4: no version information available (required by /proc/self/exe)
    [1218/104331:ERROR:main_delegate.cc(752)] Could not load cef_extensions.pak
    [1218/104334:ERROR:PlatformKeyboardEvent.cpp(94)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
    Segmentation fault (core dumped)
    [/code]

  5. On fresh Fedora 25 (running Wayland), I get a crash right after logging in:

    `
    spotify: /lib64/libssl.so.1.0.0: no version information available (required by spotify)
    spotify: /lib64/libcrypto.so.1.0.0: no version information available (required by spotify)
    spotify: /lib64/libcurl.so.4: no version information available (required by spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libssl.so.1.0.0: no version information available (required by /usr/lib64/spotify-client/spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libcrypto.so.1.0.0: no version information available (required by /usr/lib64/spotify-client/spotify)
    /usr/lib64/spotify-client/spotify: /lib64/libcurl.so.4: no version information available (required by /usr/lib64/spotify-client/spotify)
    [1216/113255:ERROR:main_delegate.cc(752)] Could not load cef_extensions.pak
    /proc/self/exe: /lib64/libssl.so.1.0.0: no version information available (required by /proc/self/exe)
    /proc/self/exe: /lib64/libcrypto.so.1.0.0: no version information available (required by /proc/self/exe)
    /proc/self/exe: /lib64/libcurl.so.4: no version information available (required by /proc/self/exe)
    [1216/113255:ERROR:main_delegate.cc(752)] Could not load cef_extensions.pak
    [1216/113303:ERROR:PlatformKeyboardEvent.cpp(94)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
    [1216/113304:ERROR:PlatformKeyboardEvent.cpp(94)] Not implemented reached in static bool blink::PlatformKeyboardEvent::currentCapsLockState()
    [1] 4254 segmentation fault (core dumped) spotify
    `

    1. You should probably raise the flag upstream, I’m just repackaging the binaries. The Spotify client is horrible; I don’t think that suppports Wayland (running X on Fedora 25 here).

      1. Actually this does not seem related to Wayland. I’m also using Fedora 25 with Wayland and I have it working properly using spotify-client@1:1.0-3.fc25. I was configuring another machine today and noticed the newer version (1:1.0-4.fc25) doesn’t work anymore (even on X).

        Are older versions from negativo repo still available somewhere? I can only see the latest one here – http://negativo17.org/repos/spotify/fedora-25/x86_64/

    2. I am having the same issue with Fedroa 25 Workstation x86_64 fresh install. Crashes after login with the error descripted on previous message.

  6. Menu towards the top right of the screen is clickable, but its options don’t work (Private session, Account, Settings, Logout). I tried pkcon refresh force and reboot, but these buttons still do nothing for me.

    1. pkcon refresh is for refreshing the software lists in Gnome software, it has nothing to do with the Spotify client.

      The last version of the client seems to have problems, they released again a minor update (1.0.43.125) but haven’t tried it yet. Will build it when I have a bit more time.
      The client is a binary blob, if things don’t work inside the client there’s not much I can do, you should open a bug to Spotify.

  7. Somehow the newer versions of Spotify don’t discover Spotify Connect devices on my network. The devices make themselves visible through avahi. They are only visible when they are linked to the same Spotify account, but before it worked just fine through automatic discovery. Any idea what could be causing this? A missing dependency, or just some regression at Spotify’s side? Sadly I can’t point to a specific version that still worked for me. Other devices can see the Spotify Connect devices just fine.

    1. Sadly there’s no changelog with the Spotify. They’ve released a new different build today for x86_64, will update to that, maybe it’s fixed.

  8. Comments from a fresh F25 installation. Seems to be a bit rough around the edges in comparison to the version I used for my F24 fresh install.

    Minor inconveniences I see:
    – Login in with facebook crashes the app. Have to type in login credentials.
    – The menu settings dont do anything if you click on them, ie. account | settings | logout

    Other than that the app is running fine. Thank you for providing this HOW TO!

    Question, your blog says in F25 it should show by default on Gnome Software. That was not the case for me, eventhough I selected to add the propietary repository in the gnome welcome menu. Did I miss anything?

  9. Weird, I’m using Fedora 25 and I’ve already added the repo, but I can’t find Spotify anywhere in the Gnome Software Center.

    However, manually installing it with dnf seems to work fine.
    Is anything wrong with my installation?

  10. Hi!
    I have noticed that my viber (http://www.viber.com/en/) seems to be conflicting with compat-openssl which goes with spotify-client. Viber starts consuming 300% CPU and doesn’t send images, etc.
    After compat-openssl removal viber starts working properly. Are there any suggestions?

      1. I can be wrong but I suppose it’s a viber issue because as i understand it shouln’t use this compat lib. Created a ticket to their support but no result so far.
        Still if anybody knows a workaround I would appreciate.

      2. Hello, I’ve made the OpenSSL 1.0.0t compatibility library a private library in Spotify’s own folder that the client then loads through its run path. There should be no more issues of Steam games compiled for the Ubuntu Runtime loading my custom library. It will be online in a few minutes.

    1. Hello, I’ve made the OpenSSL 1.0.0t compatibility library a private library in Spotify’s own folder that the client then loads through its run path. There should be no more issues of other programs loading the library. It will be online in a few minutes.

  11. please, for what are reason are you always providing the ‘yum’ (deprecated) command instead of ‘dnf’. It might create confusion in my opiniom

  12. Today’s update is trying to install compat-openssl, but it’s conflicting with openssl package already installed on Fedora 23! Halp!

    1. Can you paste the output here? I’m not seeing how it could conflict with OpenSSL 1.0.2 and its shared libraries versions’.

      1. I actually upgraded to F24 and removed the openssl1 package, so now everything’s okay. But, from what I remember, it was having file conflicts (lib64/libcrypto.so.1.0.0 and lib64/libssl.so.1.0.0).

        1. I don’t ship a package called openssl1; neither Fedora nor RPMFusion. I’ve seen that it comes from the postinstaller RPMs on Sourceforge.

          1. Puede borrar los paquetes de la cachĆ© ejecutando ‘dnf clean packages’.
            Error: Transaction check error:
            el archivo /usr/lib64/libcrypto.so.1.0.0 de la instalaciĆ³n de compat-openssl-1.0.0t-1.fc23.x86_64 entra en conflicto con el archivo del paquete openssl1-1.0.0-3.fc23.x86_64
            el archivo /usr/lib64/libssl.so.1.0.0 de la instalaciĆ³n de compat-openssl-1.0.0t-1.fc23.x86_64 entra en conflicto con el archivo del paquete openssl1-1.0.0-3.fc23.x86_64

          2. Don’t know if you’ve noticed, but everyone here writes in english.
            Just remove the package openssl1. I’m guaranteeing compatibility with Fedora and RPMFusion repositories, not everything that’s around.

  13. hello friends! i am trying to listen to local M4A’s using spotify, but it either crashes or does nothing when trying to play one; any suggestions ? (already installed ffmpeg-libs)

  14. This is awesome, thanks for maintaining this!

    Is there a way to install spotify locally, as I don’t have sufficient permissions to dnf config-manager –add-repo, or even to dnf –enable-repo?

    1. Really? Then the package is not very useful. Try to unpack it, create a script and set the appropriate library paths before starting it.

  15. In Fedora 24, I had to remove xterm -e “wget …” and execute wget directly in shell, because it wasn’t working otherwise

      1. Hello, I don’t understand. The path you specified is a link to a binary. What are you referring to?

        $ ls -al /usr/bin/spotify 
        lrwxrwxrwx. 1 root root 33 Jun  9 12:07 /usr/bin/spotify -> /usr/lib64/spotify-client/spotify
        $ file /usr/lib64/spotify-client/spotify
        /usr/lib64/spotify-client/spotify: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=8aba5fb1191078be1e87a1a5e2e8657c3c962271, stripped
  16. Hey, so i tried to install it, and it gives me the following:

    Error: nothing provides ffmpeg-libs needed by spotify-client-1.0.28.89.gf959d4ce-1.fc23.x86_64

    Many thanks,

  17. It seems there is a new version on the testing repository:

    1.0.27.71.g0a26e3b2-9

    Spotify devs claim it fixes MPRIS2. Anyone tried it yet on Fedora?

Leave a Reply