Created
August 19, 2011 06:53
-
-
Save jpetazzo/1156225 to your computer and use it in GitHub Desktop.
If Spotify crashes right after start, try this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Hopefully fixes the infamous "Spotify crashes immediately on startup" bug. | |
# In fact, it does not crash immediately; it seems to be crashing while | |
# looking for local files. The first time you start Spotify after the boot | |
# of your machine, you will have maybe 10 seconds before it crashes. Then, | |
# after each start, it will crash almost instantly (less than one second on | |
# my box). | |
# | |
# The following workaround replaces one of Spotify's configuration files | |
# with a FIFO, effectively preventing reading from the file. Then, it writes | |
# some data into the FIFO *after* starting Spotify. The goal is to delay the | |
# job of a specific Spotify thread. It works on my box, but it might not | |
# work on yours. | |
# | |
# | |
# Update the following path. | |
FAKEFILEPATH=/home/jpetazzo/.config/spotify/Users/jpetazzo-user/local-files.bnk | |
# ^^^^^^^^ ^^^^^^^^ | |
# my UNIX login | |
# my Spotify login | |
# (probably!) | |
# | |
# 3 seconds seems to be long enough to do the job. If Spotify still crashes, | |
# try with 10 seconds (but don't try longer, I think it's useless). If you | |
# can't stand to wait 3 seconds, try less. | |
STARTUPDELAY=3 | |
# | |
# Path to the real Spotify binary. | |
SPOTIFYPATH=/usr/bin/spotify | |
# | |
# Now let's do this! | |
rm -f $FAKEFILEPATH | |
mkfifo $FAKEFILEPATH | |
$SPOTIFYPATH & | |
sleep $STARTUPDELAY | |
echo > $FAKEFILEPATH | |
fg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment