Rip Real Stream
I have written a short script which takes a realplayer stream and converts it into an MP3.
Mplayer and Lame are required for decoding and recoding respectively.
The Script is as follows:
mplayer -dumpstream "$arg" -dumpfile /tmp/streamrip.rm
mplayer /tmp/streamrip.rm -ao pcm:file=/tmp/streamrip.wav
lame -b64 /tmp/streamrip.wav streamrip.mp3 rm /tmp/streamrip*
added: 20th May 2008
I was having difficulty connecting to a VPN server from my laptop and found that a computer must be connected directly to the internet or the router needs PPTP passthrough enabled.
I finally found the solution, my router is an ubuntu machine running firestarter. I found a website which explained how to do it, basically you edit the /etc/firestarter/user-pre file and then restart the firewall. These lines must be added to the file:
# Forward PPTP VPN client traffic
$IPT -A FORWARD -i $IF -o $INIF -p tcp --dport 1723 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -i $IF -o $INIF -p 47 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -i $INIF -o $IF -p 47 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
added: 11th Jul 2007
Restarting Dropped Internet
Until recently if my Ubuntu server lost the ASDL internet connection I just restarted the machine. Mainly because I needed the internet to look up how to fix it.
I looked around and found that when I had set up my modem I had created a script called dial that was in /etc/init.d/ if this script is run as sudo it will restart the internet connection.
The next step was to make this easy for my housemates to use, I therefore wanted to run this from a web interface. I created a php script which could run the bash script the crux of which is:
$command = 'sudo /etc/init.d/dial';
$output = shell_exec("env -i $command");
Now I had to give the php server permission to run this file as root without using a password. To do this I edited the sudoers file using the visudo command and added the following line:
www-data ALL= NOPASSWD: /etc/init.d/dial
I can now restart my internet connection by running this php script from my browser.
added: 31st May 2007
Linksys Wireless Card
I have a linksys PCMCIA wireless card which it took me a little while to get working in Ubuntu. To find the specific chipset, type lspci into the terminal. My card is the BCM4318. It would appear that this card of all in the BCM43xx series will not work with the standard driver and you must use ndiswrapper. There are instructions on the Ubuntu Forums
Update: With the release of fiesty it appears this card is now supported with the BCM43xx driver, however the ndiswrapper still works better for me.
There is a problem with Network Manager in feisty however which stops it from connecting properly to unsecured networks, there is much discussion about it but not much help. I can get my laptop to connect using wifi-radar, plus if I disconnect again using wifi-radar Network Manager is then able to connect.
added: 20th Apr 2007
Citrix Client Program
I had a slight problem getting the citrix program to work on my laptop so I could use the remote applications service provided by Newcastle University.
In the end I ran firefox through a terminal and when opening the ica file I opened it with /usr/lib/ICAClient/wfica. When I looked in the terminal window I was missing a file called libXaw.so.6. A quick search in synaptic found the package and solved the problem. It appears Ubuntu uses v7 and Citrix wants v6.
added: 16th Nov 2006
Speedtouch ASDL modem
My ASDL modem broke recently so I had to replace it with the one I got free from Tiscali when I signed up for internet. A little research found a site saying how to set up a speedtouch modem.
A little more research suggested using the firestarter package to sort out the connection forwarding. (oh and you must remove the gateway address from your ethernet card).
Also if you find the connection had dropped out, you can restart your computer or you can run the dial script written in the setup:
added: 30th Oct 2006