{"id":5385,"date":"2021-01-11T17:33:17","date_gmt":"2021-01-11T17:33:17","guid":{"rendered":"http:\/\/www.webputzer.com\/?p=5385"},"modified":"2021-01-28T21:29:20","modified_gmt":"2021-01-28T21:29:20","slug":"getting-spotify-to-work-on-ubuntu-based-linux-in-2021","status":"publish","type":"post","link":"http:\/\/www.webputzer.com\/?p=5385","title":{"rendered":"Getting Spotify to Work on Ubuntu-based Linux in 2021"},"content":{"rendered":"<h2>This was a trick<\/h2>\n<p>One of the few online services for which I pay is Spotify.  I enjoy the uninterrupted music, the podcasts, etc. And since I spend 95% of my time using Linux, I want it to work on Linux.  I read a number of posts before I finally got the damned thing to work on various derivatives of Ubuntu Linux (Mint, Elementary OS, Zorin, Peppermint, etc).<\/p>\n<h2> Video would not play<\/h2>\n<p>The primary issue I had with Spotify, which I used to install from a .deb package, is that video podcasts failed to play the video streams.  Basically, the whole thing was a little buggy.  <\/p>\n<h2>The fix &#8211; some weirdness, but it works<\/h2>\n<p>I read numerous pages, on the web, which suggested numerous fixes.   The following steps have worked every time, for me, since about November 2020.  I&#8217;m not a serious &#8220;tech&#8221; person and I don&#8217;t know why all of this works &#8211; but it works.<\/p>\n<ul>\n<li> Install Spotify, and some dependencies, from the following script:\n<pre>#!\/bin\/bash\r\nsudo apt-get install libatk-adaptor:i386 -y\r\nsudo apt-get install --reinstall overlay-scrollbar-gtk2\r\necho \"deb [trusted=yes] http:\/\/repository.spotify.com stable non-free\" >> \/etc\/apt\/sources.list\r\nsudo apt-get update\r\nsudo apt-get install spotify-client\r\n\r\necho \"-----------------------------------------------------\"\r\necho \" First run is usually a problem.  Run the following  \"\r\necho \" from a command line:                                \"\r\necho \" while true; do spotify && exit; done                \"\r\necho \"-----------------------------------------------------\"\r\necho \"\"\r\nexit\r\n<\/pre>\n<li> As indicated in the script, <strong>attempt to launch the program <\/strong>(as a user, not as root) from a command line with:\n<pre>while true; do spotify && exit; done <\/pre>\n<li> In my experience, you may get a brown screen and the Spotify GUI may or may not display properly &#8211; if it does not display properly, don&#8217;t despair&#8230;&#8230;  Just close the darned thing and continue with the following steps.\n<li> Before we do anything else, use your favorite text editor (nano, vim, gedit &#8211; whatever) and open the file <strong>\/usr\/share\/applications\/spotify.desktop<\/strong> and edit the line that starts with &#8220;Exec&#8221; to the following:\n<pre>Exec=spotify  %U --disable-gpu<\/pre>\n<li> Now, reboot your computer\n<li> Launch Spotify from it&#8217;s desktop shortcut, and, be patient &#8211; for whatever reason sometimes it launches very slowly the first time it&#8217;s run after this process.  If it&#8217;s taking too long, kill the process and re-launch the app.\n<li> <strong>Sometimes videos, from podcasts, won&#8217;t play<\/strong>&#8230;.the first time you try.  Close the app and try again.  If this dosen&#8217;t work, reboot &#8211; again.  In my experience, while this makes no sense, videos will then start working and continue to work.  As I&#8217;ve said, it&#8217;s all a mystery to me.\n<li> Bizarrely, in my experience, once it finally works it will work fine thereafter.  Why?  Ask some smart guy &#8211; I have no idea.  But, again, once it starts working (based upon my experiences) it will continue to work fine.  Videos will play, etc.  If you still have problems, please leave a comment.\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This was a trick One of the few online services for which I pay is Spotify. I enjoy the uninterrupted music, the podcasts, etc. And since I spend 95% of my time using Linux, I want it to work on Linux. I read a number of posts before I finally got the damned thing to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"footnotes":""},"categories":[21],"tags":[],"class_list":["post-5385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/5385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5385"}],"version-history":[{"count":0,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/5385\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/media\/5404"}],"wp:attachment":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5385"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}