I constantly listen to Pandora (even while I sleep). However one thing I’ve always disliked about Pandora was that it required Flash. You remember Flash, it’s that enormous resource hog that’s constantly crashing. Then I discovered Pianobar, the open-source Pandora client that runs in your terminal. Pianobar is chock full of features:
- play and manage (create, add more music, delete, rename, …) your stations
- rate played songs and let Pandora explain why they have been selected
- show upcoming songs/song history
- configure keybindings
- last.fm scrobbling support (external application)
- proxy support for listeners outside the USA
If you’re running Ubuntu, you can install Pianobar simply by typing
sudo apt-get install pianobar, and to launch it type
pianobar. If your on OS X there a few more steps:
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/localThis will install the Homebrew package manager. Homebrew is like apt-get, except for OS X. Now type
brew install pianobarto install Pianobar. That’s it! You can start enjoying music in your terminal.
We’re Super User’s, and that means we have a need to customize everything. That’s why you have that unicorn wallpaper. So how can we customize Pianobar? Well first of all, typing in your username and password every time you want to listen to music is annoying. Luckily you can create a config file for Pianobar to avoid this. Open your favorite text editor (cough gedit) and enter this:
user = firstname.lastname@example.org password = ilikeunicorns audio_format = mp3-hifiThis is pretty self explanatory. The first line is where your username will go and line two is for your password. The third option tells Pianobar to download high quality audio; if your on a slow connection you can omit this option. You’ll need to save this file in ~/.config/pianobar/ as config.
One feature I really like about the AdobeAIR client for Pandora are the notifications on song change. We can replicate this on Ubuntu using libnotify-bin (download via
sudo apt-get install libnotify-bin) or on OS X by using Growl (
brew install growlnotify). Now reopen the config file and add this line at the bottom:
Ubuntu: event_command = /home/myuser/bin/pianobar-notify
OS X: event_command = /Users/yourusername/bin/pianobar-notify.rbGrap the correct file for your operating system here: Ubuntu / OS X
Now that we have working notifications, it would be nice if we didn’t need that extra terminal window open all the time. To avoid this you can install Tilda. Tilda is a terminal that runs in the background; when you need it just press a shortcut key and you have a terminal, press again and it’s gone. To get Tilda just type
sudo apt-get install tilda.
Now we have successfully cut the cord that connected Mother Flash and Baby Pandora; in the process reclaiming precious memory.
Filed under Software