Windows, Mac, iOS and Android versions of spotify have the option to go into offline mode whenever I want. That's needed if I'm on the road using smallband mobile internet for emails and stuff but don't want to have spotify draining my data plan.
On Linux (atm running version 1.0.14 beta) there is everything I need for syncing the most wanted playlists for offline use, but sadly there is no offline mode. I can listen while I don't have network at all, but if I use my mobile internet, I can't be 100% sure that spotify won't drain my data plan for cover art, updating subscribed playlists and most important, if I accidentially select the wrong playlist it streams over my mobile connection and probably I won't recognize fast enough.
I guess we will get the "Go Offline" function as soon as the beta version get's the menu bar, because in other versions it's seated there. But until then I have two workarounds that might be interesting to others, too.
First workaround is to set Spotify to use a socks5 proxy running on localhost Port 1080. Since normally there is no socks proxy running, it won't connect and go offline. Feel free to use whatever proxy type and port you want, as long as the port is not used, Spotify will fail to connect and go into offline mode.
Disadvantage: You need to restart spotify whenever you want to switch between online (no proxy) and offline (nonexistant proxy) For this there is a
Second workaround: Set spotify again to use socks5 on localhost:1080. Then you need to have SSH server running on your machine, most of us probably will have that running anyway. Then just start an SSH client like this:
ssh -N -D localhost:1080 localhost
As long as this is running, your spotify client will be online. It might need some 10 or 20 seconds to recognize that it has connection after you start ssh, so be patient, but you won't have to restart spotify. Terminate the SSH with CTRL-C and Spotify will go offline again.
For natural born system administrators, the second workaround can be achieved in a more sophisticated way using the
Third workaround: You could set up a full fletched socks5 server like dante listening on localhost:1080 only. Let spotify use socks5 to another port that is not used by anything, like 1081. Then use something like socat to connect the unused port to dante whenever you want to go online. Like:
socat -d -d TCP4-LISTEN:1081,bind=127.0.0.1,fork TCP4:127.0.0.1:1080