0

I have installed spotify on my ubuntu 12.04 machine. When I start Spotify it simply closes. I found a way to circumvent this problem in some forum: simply remove the folder ~/.cache/spotify It is however rather annoying that I have to delete this folder every time I want to use Spotify.

My question is, is there a way to tell Ubuntu that it should delete this folder and its content when I start my computer? And if so, how do I do that?

My idea is to add something like the following to the .bashrc file

if [ -d ~/.cache/spotify ]; then 
  rmdir ~/.cache/spotify 
fi
4

3 に答える 3

0

簡単なエイリアスを設定できます。

alias spotify="rm -rf ~/.cache/spotify && spotify"

これをファイルに追加する.bashrcと、 を実行するたびspotifyに、キャッシュ ディレクトリが最初に削除されます (存在しない場合は無視されます)。

于 2012-08-14T11:44:17.990 に答える
0

どのバージョンの Spotify を使用していますか? 環境設定でキャッシュの最大サイズを 0 に設定するとどうなりますか?

于 2012-08-21T14:34:34.897 に答える
0

Linux の起動時に 1 つのタスクを実行する必要がある場合は、/etc/rc.local ファイルを使用することをお勧めします。ただし、これは単なる回避策であるため、プログラムの実際の実行前にrm -rf /home/your_username/.cache/spotifyを追加して、spotfiy の起動スクリプトを変更できます。

于 2012-08-14T11:46:56.623 に答える