LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > Debian This That and the Other
User Name
Password

Notices

Over several years of using Linux distros (Debian happens to be my fave) and BSDs for my primary computing, I've picked up the odd piece of useful info.
Rate this Entry

Online Radio Fun

Submit "Online Radio Fun" to Digg Submit "Online Radio Fun" to del.icio.us Submit "Online Radio Fun" to StumbleUpon Submit "Online Radio Fun" to Google Submit "Online Radio Fun" to LinuxQuestions.org
Posted 11-04-2009 at 08:05 PM by ofaring

In the spirit of old hardware and minimalism I've set up my fave radio stations in a little bash script. Perhaps not the most elegant solution, but it works for me. Especially since I employ Debian Multimedia's mplayer-nogui package.

Code:
#!/bin/bash
#
# "Radio.sh" An online radio station list/script from ofaring @ linuxquestions.org
#
OPTIONS="Pure.DJ DI.Trance Proton.Radio Bassdrive MTH.House DI.C.Techno Tags.Trance.Trip Dark.Wax Trance.Ah ----- "
OPTIONS="${OPTIONS}Bluemars.Ambient DI.Chillout Groove.Salad Secret.Agent ----- "
OPTIONS="${OPTIONS}Lush.SomaFM Radio.Paradise ----- "
OPTIONS="${OPTIONS}Mostly.Classical Quit"
select opt in $OPTIONS; do
 if [ "$opt" = "Pure.DJ" ]; then
	mplayer http://81.23.249.40:8000 # http://www.puredj.com/etc/pls/128K.pls #
  	exit
  elif [ "$opt" = "DI.Trance" ]; then
	mplayer http://scfire-dtc-aa01.stream.aol.com:80/stream/1003 # http://di.fm/mp3/trance.pls #
  	exit
  elif [ "$opt" = "Proton.Radio" ]; then
        mplayer http://scfire-ntc-aa03.stream.aol.com:80/stream/1041 # http://protonradio.com/proton.m3u #
  	exit
  elif [ "$opt" = "Bassdrive" ]; then
        mplayer http://aol.streams.bassdrive.com:8008 # http://www.bassdrive.com/v2/streams/BassDrive.m3u #
  	exit
  elif [ "$opt" = "MTH.House" ]; then
        mplayer http://stream.mth-house.de:8500 # http://stream.mth-house.de:8500/listen.pls #
        exit
  elif [ "$opt" = "DI.C.Techno" ]; then
        mplayer http://205.188.215.225:8004 # http://di.fm/mp3/classictechno.pls #
        exit
  elif [ "$opt" = "Tags.Trance.Trip" ]; then
        mplayer http://205.188.215.230:8012 # http://somafm.com/tagstrance.pls #
        exit
  elif [ "$opt" = "Trance.Ah" ]; then
	mpalyer http://ca.ah.fm:9000 # http://www.ah.fm/192k.m3u #
	exit
  elif [ "$opt" = "Dark.Wax" ]; then
	mplayer http://217.168.150.207:8000/listen # http://www.darkwaxradio.com/listen.m3u #
	exit
### ---------------------------------- ###
  elif [ "$opt" = "Bluemars.Ambient" ]; then
        mplayer http://207.200.96.225:8020 # http://207.200.96.225:8020/listen.pls #
        exit
  elif [ "$opt" = "DI.Chillout" ]; then
        mplayer http://scfire-ntc-aa01.stream.aol.com:80/stream/1035 # http://di.fm/mp3/chillout.pls #
        exit
  elif [ "$opt" = "Groove.Salad" ]; then
        mplayer http://streamer-ntc-aa04.somafm.com:80/stream/1018 # http://www.somafm.com/groovesalad.pls #
        exit
  elif [ "$opt" = "Secret.Agent" ]; then
        mplayer http://streamer-dtc-aa03.somafm.com:80/stream/1021 # http://somafm.com/secretagent.pls #
        exit
### -------------------------------- ###
  elif [ "$opt" = "Lush.SomaFM" ]; then
        mplayer http://streamer-ntc-aa01.somafm.com:80/stream/1073 # http://somafm.com/lush.pls #
        exit
  elif [ "$opt" = "Radio.Paradise" ]; then
        mplayer http://scfire-ntc-aa04.stream.aol.com:80/stream/1048 # http://www.radioparadise.com/musiclinks/rp_128.m3u #
        exit
### -------------------------------- ###
elif [ "$opt" = "Mostly.Classical" ]; then
        mplayer http://scfire-mtc-aa02.stream.aol.com:80/stream/1006 # http://www.sky.fm/mp3/classical.pls #
        exit
### ---------------------- ###
  elif [ "$opt" = "Quit" ]; then
  	exit
  else
	echo 'Wrong, sucka!'
 fi
done
The usual rules apply. Copy/paste it as (really, whatever you like) "Radio.sh". Move it to your preferred location. Chmod 777 it, or change the ownership to your regular user and chmod 700 it. Give'r. E.G.:
Code:
# mv Radio.sh /opt/bin
# chmod 777 Radio.sh
% Radio.sh
Or simply put it somewhere safe, and:
Code:
% cd your_save_location
% chmod 700
% ./Radio.sh
Obviously you are better off with a console version of mplayer or something similar. I used mpg123 for quite a while, but I find mplayer more robust.

One of the reasons I appreciate Debian is its flexibility. When I install KDE or GNOME software through apt-get, I can verify that I'm getting the bare minimum of dependencies required to run that program. Awesome. Especially when you know that my Linux fun began with fat distros like (at the time called) Mandrake and Suse. I may still respect their efforts, but their newest versions would barely run on my old hardware today. No diss intended, but this flexibility even beats Slackware.

Remember that I run old hardware.

I could pick through the KDE sources and build minimal versions of KDE and Qt to run the KDE programs which I use. Of course the build takes f-o-r-e-v-e-r. (Intel never intended a 400MHz Celeron processor with 192Mb of RAM to compile bloated modern software.) And then I have to hope that everything is kosher, 'cause I ain't in the mood to spend three days just supplying dependencies for, let's say, the Opera web browser. (Version 10 kicks ass, by the way. It seems to have solved stability issues which version 9 had introduced.)

So, the fact that I'm able to choose between the normal mplayer install with a gui included and a version without the gui - 'cause I never use it anyway - is very Debian-minimalist like.
Posted in Examples
Views 159 Comments 0 Edit Tags
« Prev     Main     Next »
Total Comments 0

Comments

 


All times are GMT -5. The time now is 12:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration