Archive for the ‘internet’ tag
Using Spotify Links In Linux
I’ve yet to officially start my tutorials on Linux, but I’ve been playing around with Spotify recently and I’ve been annoyed by the problem of getting Spotify playlists to load from my web browser directly into Spotify. For those who don’t know about Spotify, I suggest you read my previous post, and if you still want invites, I am getting them on a daily basis, so please apply. Spotify playlists can be shared easily in the form of a link, and there have been several websites set up to publish these links. The problem of using these links in Linux consists of two issues:
- Getting the browser to recognize a Spotify link (in the form: spotify:user:jacken:playlist:5CUB76CWjf2vFxZymgO3cW).
- Getting the browser to execute the link as an argument on a program running through wine, the Linux windows compatibility layer.
The first problem can be solved quite easily in Firefox, but it does involve messing around with the configuration a bit. Open a new tab, type “about:config” (without the quotes) and press enter. If you are running a recent version of Firefox, you should click the button accepting the “this might void your warranty” message. Right click anywhere on the page (which should have filled with a table of options) and create a new boolean. In the preference name box, type “network.protocol-handler.external.spotify” (again without quotes), and then choose the value true for the option. This has now enabled the spotify protocol in Firefox, meaning that whenever the browser is sent a request to open something with the prefix spotify: it will ask the user what to do with the request. Of course, the 2nd problem is getting Firefox to communicate to a program that does not run natively within Linux. To bypass this, we can create a simple script that Firefox can execute. The script will then do all the complicated bits that Firefox can’t do. Open up a terminal, and execute this command:
cd ~/.wine/drive_c/Program\ Files/Spotify/
If you have installed wine with default settings, this is where all the Spotify files are located. Otherwise, you will have to modify the command to cd you into the correct Program Files directory. Once in the directory, you should find two files, spotify.exe and Uninstall.exe (use the ls command to check). Create a file called “spotify.sh” in this directory, and edit it with your favourite text editor. Copy and paste the following into the file:
1 2 | #!/bin/bash wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1" |
Save the file and exit the text editor. What does this code mean? Well, the first line (known as a sha-bang!) tells the system what type of file our script is, and which interpreter to use when executing it. In this case, we want to run the script through the bash shell, so we give it the location of bash on the system (which is 99.9999% always /bin/bash, but you can find out by typing which bash into a terminal and alter accordingly). The next line is the command we want the script to execute, which calls on wine to run spotify.exe file with the argument /uri and the link url given by Firefox when executing ($1). $HOME is simply a shell variable that stores your home directory location (usually in the form: /home/username). Now all you have to do is make the file executable:
chmod +x spotify.sh
Now try it out on a spotify link! If spotify is already open, the playlist should appear on the left, otherwise spotify will open up and display the playlist for you. When you click on the link, Firefox should ask you what you want to do with it, and all you have to do is select the spotify.sh file we just wrote. If it doesn’t ask when you click on a link, you will need to go into Edit -> Preferences -> Applications and find “spotify” in the list, then select the file using the “use other” action.
This Blog Is Quickly Becoming All About Spotify!
I really didn’t want to create yet another post about Spotify invites, but they’ve just given me an extra 5 invites to use. Due to the popularity of the service, and the fact that I don’t know how many invites they will eventually give me, I am going to start regulating stuff.
From now on, I won’t be accepting people’s requests from comments. If you want to be put on the waiting list, please use my contact form, specifying the “Reason for contact” as the option: Request Spotify Invite. The current waiting list is compiled from comments in date order (so if you have already requested an invite through the comments, please don’t contact me again!).
Due to blog reader indieboy86’s research into the matter, you can use Spotify outside of the EU! Simply use a proxy server with your browser. The server with HTTP Proxy: 217.112.93.9 and Port: 6654 seem to work for most people, but there are several available on the web.
As I get new invites, I’ll simply send them to the first people on the list. If the invites don’t work for some reason, please inform me and I’ll send them to someone else (this keeps the system fair). Also, if I notice someone hasn’t accepted their invitation within a week, I’ll give it to someone else.
So as of this blog post, 5 new invites have been sent to readers: Fake_Brasilian, griffon8, Tone, Jake Collyer, and Paul Klipp.
Spotify Invites (Take 2)
It seems I had a bit of a misunderstanding with Spotify’s release area, and so currently people in American and Australia cannot use the service. So far two people out of the five have given back their invitations, and I have had one confirmation of a successful install, so until I hear back from the other two, I have a couple of invites going spare.
Same rules as last time, first come first served, only make sure you live in Europe! I know there were a few people on the original invite list who were in “waiting” but since I have no way of knowing where you are located without contacting you, I’m going to have to do it this way.
So just to clarify, only ask for an invite if you live in Europe!
Of course there are still no guarantees the service will work for you, but so far it works in England, Belgium, and Luxembourg to my knowledge, so I don’t see why it wouldn’t work elsewhere on the continent.
Again, apologies for this! Hopefully all remaining invites will *eventually* make it to people who can use them!
Spotify Invites
I spoke about Spotify a few weeks ago, and today I got given 5 invites. Soooo…anyone want them? Just leave a comment (fill in your real email address) and the first 5 people shall receive them.
Remember, this isn’t a standard music player, nor does it allow you to download music. It’s an online music player (like an online radio) but where you can search for specific songs and play them in the order you want. Every 30 minutes of play, there is a 30s advert (that’s how they make money).
Spotify: A New Era Of Digital Music Has Arrived
As I write this, I’m listening to random tracks in Spotify. The quality is great, the music choice is vast, and the program is lightning fast (literally). So what is Spotify?
Spotify is an online music player that you can download and install on your computer. I’m prohibited to post any screenshots by the TOS of the beta, but I can tell you what it does. Once installed (yes, it runs through wine as well), Spotify allows you to search for music. I type “The Killers” hit Enter, and 0.5 seconds later, my search results are returned. To put this is perspective, I’m on a relatively slow network (3MBit), my laptop is using wireless (that slows down the connection a bit already), and my search has to go through 9 hops to get to the server in question. When my search reaches the server, it has to process it and get the list of results and then send them back to me to be processed in the program. Considering the amount of music Spotify has, this is amazingly fast.
So now I have a list of results, and I click on a song, “Mr Brightside”. The most astounding part of Spotify is now presented to me. I thought the search was fast, but the song starts playing immediately after I click on it. The delay is so minute I could swear that I am playing the song from a local file on my computer, but I’m not. The song is streaming across the internet and playing on my computer, without any delay or lag. What is even more astounding is that the program doesn’t seem to buffer the songs at all, because I can click to the last 10 seconds of the song in question and it will play that part immediately, with no delay.
When my friends and I started using it, everyone in the room was astonished, and considering we are all Computer Scientists and know how networks work, that is saying something. We were absolutely convinced the program relies on magic to operate, because networks simply do not allow that kind of speed and efficiency. Florian, the guy who invited me into the beta, swears blind that he ran the program without any problems on a 56k modem in a crappy hotel, where the internet was so bad Google was taking it’s time to load.
We were so impressed by this technology that I phoned up the company to say so. They revealed nothing about how it worked though, so I have to go get a job with them now.
Oh, and I forgot to mention, this program is entirely legal. They pay the licenses for all the music by putting in 30 second ads every 30 minutes of music you listen to. If you pay a fee though, you can remove the adverts completely. This program has everything it needs to head the new era of digital music; unlimited songs, speed, usability, and freedom.
At the moment it’s invite only, so if I get some invites I’ll let you know! Until then, you’ll have to sign up to the mailing list which will tell you when Spotify becomes public.
Contact Adrian Hayter
My Facebook
My Atheist Nexus Page
My Twitter
My Reddit
My Atheist Spot
My FriendFeed
My Technorati
Atheist Forums

