How To Install The Native Spotify Linux Client In Ubuntu (With Fixes)

6:49 PM


Spotify is a music streaming service that comes with a client which supports Microsoft Windows, Mac OS X, Linux as well as mobile devices such as iOS, Android, BlackBerry, Windows Mobile, Windows Phone, S60 (Symbian), webOS and more. The service is only available in a few countries for now, such as USA, UK, Spain, Sweden and more - check out the Spotify website for more info.

The (official) native Spotify Linux client got support for free accounts recently. Here is how to install it on Ubuntu and fix some bugs such as not being able to play local music in Ubuntu 11.10 Oneiric Ocelot.

Please note that Spotify for Linux is a preview release and is currently unsupported so you may encounter issues!


Install the native Linux Spotify client under Ubuntu


1. Add the Spotify repository (will be used to install Spotify and stay up to date with the latest Spotify versions).

Launch Software Sources using the following command:
gksu --desktop /usr/share/applications/software-properties-gtk.desktop /usr/bin/software-properties-gtk

2. Under Software Sources, switch to the "Other Software" tab, click "Add" and paste the following line:
deb http://repository.spotify.com stable non-free

Once you do this, two repository lines are actually added and the second one (for source code) will display an error when running "sudo apt-get update", so remove this line:
http://repository.spotify.com stable non-free (Source Code)

from the same "Other Software" tab in Software Sources. Once you're done, close the Software Sources window.

3. Import the Spotify repository key and install Spotify for Linux:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
sudo apt-get update
sudo apt-get install spotify-client-qt



Spotify fixes for Ubuntu



Spotify has been installed, but if you are using Ubuntu 11.10 Oneiric Ocelot (or newer), you can't play local music, or at least some file types don't work and you'll get a sound decoder error:

"There is a problem with the sound decoder. Spotify can't play music"

This may even occur for some Spotify tracks.

To fix this, you need to install libavutil50, libavcodec52 and libavformat52 from the Ubuntu 11.04 Natty Narwhal repository. To make it easier (thanks to yugnip!), you can get all 3 from here:

Download the .debs above in a new folder, then use the terminal to navigate to it ("cd /path/to/folder") and run:
sudo dpkg -i *.deb


Another annoyance is that Spotify for Linux doesn't display any artwork in the Ubuntu Sound Menu, at least in Ubuntu 11.10. To fix this, use the command below:
mkdir -p ~/.cache/indicators/sound/album-art-cache

Unfortunately I didn't found a fix for the out of place "Upgrade" button.


via PinguyOS forum; thanks to Antoni "Pinguy" for the tip!

1 comments:

parvina said... Reply Comment

Your article is extremely good.I love to read your blog's posts everyday and I got huge help from your blog and developed a new app spotify web you can check.Thanks for amazing blog.

Post a Comment