td03-5
.
- Joined
- Dec 21, 2004
- Messages
- 373
- Reaction score
- 0
- Points
- 0
- Age
- 76
- My Satellite Setup
- .
- My Location
- UK
(To Mods: Hope this is OK here but please move if not - thanks, John)
High All,
How to do this may be common knowledge but I've searched here and many other places and could not find a full answer. So in case it's of any use here is what I wanted and how I did it.
What I wanted to do was use my Eee PC (mini 7" Linux laptop) as a Satellite Radio Player, while I'm at work. After setting up port forwarding in my router, the problem I found is that my Dreambox 7000S (Enigma 1, Gemini 4.6 in US, sends its local LAN IP in the 'audio.pls' file that it sends and my DynDNS was required. I could get things working by editing the 'audio.pls' file to change the local IP to the DynDNS and then open it with VLC but this was slow and clumsy.
To automate this process I have written a short Shell Script. I call this script 'vlcplsed' and I have placed it in the /usr/bin folder on the Eee PC (No, I know it's not a binary but it seemed convenient to sit it beside VLC itself) and given it Execution permission (chmod 755 or similar). This script changes the Local IP in 'audio.pls' to my DynDNS and then calls VLC to open the file as normal.
The first time I clicked on an Audio PID after installing the file I clicked the Drop-down, selected Other, navigated to /usr/bin, selected vlcplsed and clicked OK. It now comes up as the default and I just click OK but I can still select VLC itself from the drop-down if required.
It works great! Almost no difference from opening Radio Stations on the LAN at home (there's always a bit of delay). Of course there are the Audio channels of all the TV stations to listen to as well. Not too useful on some stations but on music video channels it's fine!
At the risk of teaching Granny to suck eggs.....here is the full process of what is required to get this working:
1. Below this list is the contents of the Shell Script vlcplsed
2. Using copy and paste, load it into a text editor.
3. Edit the Local IP & DynDNS to suit your own requirements and save as: vlcplsed
4. Copy the file to folder /usr/bin
5. Change the file attributes (chmod) to 755 (use file manager or chmod via Console [probably needs : sudo]).
6. Start Firefox and log-in to my Dreambox.
7. Select any station & click the Audio PID.
8. When the 'Open With' box appears select Other from the drop-down.
9. Navigate to /usr/bin and select: vlcplsed
10. Check any 'Add This Action' box if available.
11. Click OK.
12. After a short delay VLC should open and after another short delay the audio should be heard.
13. You should now be able to close VLC (clear and close the downloads box).
14. Now select another station & click the Audio PID.
15. This time the 'Open With' box should default to: vlcplsed.
16. If this is so then just click OK.
Here is the Shell Script, it should also be OK in other flavours of Linux, copy everything from: #!/bin/bash all the way down to: exit 0
#!/bin/bash # Script file: vlcplsed - written by TD03-5 V1.0 04/02/2009 # Purpose: To change local IP to Internet DynDNS of Dreambox in sent audio.pls file # for remote audio streaming with Eee PC running Xandros Linux (may be OK for other Linux). # Usage: # Open this file with a text editor and:- # Change: 192.168.0.24 to your Dreambox local IP. # Change: dreamdns.homelinux.net to your Dreambox DynDNS or Static Internet IP. # After editing, copy the file to /usr/bin folder and change attributes (chmod) to 755 # Log-on to Dreambox remotely via internet, select a station and click the audio PID. # When 'Open With' appears select 'Other' & navigate to /usr/bin/vlcplsed and select it. # This script will run to change the playlist file and then call VLC to open the playlist. # Presto........remote audio streaming without editing the audio.pls file! sed '/192.168.0.24/s//dreamdns.homelinux.net/' $1 > /tmp/dnsdb.tmp rm $1 cp /tmp/dnsdb.tmp $1 exec /usr/bin/vlc $1 rm $1 rm /tmp/dnsdb.tmp exit o ##########################################
(BTW, This forum editor certainly makes a mess of the output from a Linux text editor! I've left the Shell Script the way it came out so just copy and try it. The rest I've reformatted to make it look acceptable.)
If there is an easier way then....sorry to have wasted your time (please tell me about it).....if not...then I hope this is of use to someone.
Best wishes, John.
High All,
How to do this may be common knowledge but I've searched here and many other places and could not find a full answer. So in case it's of any use here is what I wanted and how I did it.
What I wanted to do was use my Eee PC (mini 7" Linux laptop) as a Satellite Radio Player, while I'm at work. After setting up port forwarding in my router, the problem I found is that my Dreambox 7000S (Enigma 1, Gemini 4.6 in US, sends its local LAN IP in the 'audio.pls' file that it sends and my DynDNS was required. I could get things working by editing the 'audio.pls' file to change the local IP to the DynDNS and then open it with VLC but this was slow and clumsy.
To automate this process I have written a short Shell Script. I call this script 'vlcplsed' and I have placed it in the /usr/bin folder on the Eee PC (No, I know it's not a binary but it seemed convenient to sit it beside VLC itself) and given it Execution permission (chmod 755 or similar). This script changes the Local IP in 'audio.pls' to my DynDNS and then calls VLC to open the file as normal.
The first time I clicked on an Audio PID after installing the file I clicked the Drop-down, selected Other, navigated to /usr/bin, selected vlcplsed and clicked OK. It now comes up as the default and I just click OK but I can still select VLC itself from the drop-down if required.
It works great! Almost no difference from opening Radio Stations on the LAN at home (there's always a bit of delay). Of course there are the Audio channels of all the TV stations to listen to as well. Not too useful on some stations but on music video channels it's fine!
At the risk of teaching Granny to suck eggs.....here is the full process of what is required to get this working:
1. Below this list is the contents of the Shell Script vlcplsed
2. Using copy and paste, load it into a text editor.
3. Edit the Local IP & DynDNS to suit your own requirements and save as: vlcplsed
4. Copy the file to folder /usr/bin
5. Change the file attributes (chmod) to 755 (use file manager or chmod via Console [probably needs : sudo]).
6. Start Firefox and log-in to my Dreambox.
7. Select any station & click the Audio PID.
8. When the 'Open With' box appears select Other from the drop-down.
9. Navigate to /usr/bin and select: vlcplsed
10. Check any 'Add This Action' box if available.
11. Click OK.
12. After a short delay VLC should open and after another short delay the audio should be heard.
13. You should now be able to close VLC (clear and close the downloads box).
14. Now select another station & click the Audio PID.
15. This time the 'Open With' box should default to: vlcplsed.
16. If this is so then just click OK.
Here is the Shell Script, it should also be OK in other flavours of Linux, copy everything from: #!/bin/bash all the way down to: exit 0
#!/bin/bash # Script file: vlcplsed - written by TD03-5 V1.0 04/02/2009 # Purpose: To change local IP to Internet DynDNS of Dreambox in sent audio.pls file # for remote audio streaming with Eee PC running Xandros Linux (may be OK for other Linux). # Usage: # Open this file with a text editor and:- # Change: 192.168.0.24 to your Dreambox local IP. # Change: dreamdns.homelinux.net to your Dreambox DynDNS or Static Internet IP. # After editing, copy the file to /usr/bin folder and change attributes (chmod) to 755 # Log-on to Dreambox remotely via internet, select a station and click the audio PID. # When 'Open With' appears select 'Other' & navigate to /usr/bin/vlcplsed and select it. # This script will run to change the playlist file and then call VLC to open the playlist. # Presto........remote audio streaming without editing the audio.pls file! sed '/192.168.0.24/s//dreamdns.homelinux.net/' $1 > /tmp/dnsdb.tmp rm $1 cp /tmp/dnsdb.tmp $1 exec /usr/bin/vlc $1 rm $1 rm /tmp/dnsdb.tmp exit o ##########################################
(BTW, This forum editor certainly makes a mess of the output from a Linux text editor! I've left the Shell Script the way it came out so just copy and try it. The rest I've reformatted to make it look acceptable.)
If there is an easier way then....sorry to have wasted your time (please tell me about it).....if not...then I hope this is of use to someone.
Best wishes, John.