Spotify Bash Script for Improved Stability
So if you have used Spotify on Linux you will notice that there are often times where it will crash on start or act very broken after a launch and that seems to be primarily due to unwanted data being left in cache or config temps which seem to cause hangups.
Here is a special little bash script that makes Spotify work more smoothly and this especially makes the latest Beta with Spotify Apps work very nicely but can work in earlier versions as well:
1
2
3 #!/bin/bash
# Purge Spotify's ever horrible cache and temp config then run spotify
rm -Rf $HOME/.config/spotify && rm -Rf $HOME/.cache/spotify && spotify
For those who want to run this script as an application shortcut so it does tidying and then launches Spotify then simply do this from terminal:
1. nano spotify.sh
2. paste above code
3. chmod +x spotify.sh
4. Now sudo nano /usr/share/applications/spotify.desktop and paste this in but make sure to edit the “Exec” path to match the location of the Spotify.sh location on your system:
[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Listen to music using Spotify
Icon=spotify-linux-512×512
Exec=/home/bkerensa/bin/spotify.sh
TryExec=spotify
Terminal=false
Type=Application
Categories=Qt;Audio;Music;Player;AudioVideo
MimeType=x-scheme-handler/spotify
Now whenever you click the Spotify icon in the Unity launcher or whatever DE on Ubuntu you happen to be using it should execute the spotify.sh script which will tidy up and then run Spotify.
Hope this is useful for some!
-
MatthewAguirre
-
solancer_com
-
bryandfleming
-
whereisdarran
-
Roger Dean
-
Roger Dean
Hosting & CDN Powered By:
Get Updates!
Subscribe for updates on my latest blog posts!
Listen to Open Source Music!
Featured YouTube Video
Reading or Read
FEATURED IN

Tags
12.04 12.10 2012 Amazon Android Apps Birthday Blogging Canonical Chuck Cloud Community Dell Facebook Firefox FOSS Google+ HP iPhone Linux LoCo Marketing Mozilla music Netflix Occupy Portland Occupy Wall Street Open Source Oregon Politics Portland Privacy Quantal Quetzal Redhat Sharing Social Spotify Sprint Twitter Ubuntu UEFI Video WebFWD WebOS Windows





