PRAEst76’s big linux FAQ v0.6c

This is my big linux FAQ. Being somewhat of a linux numpty most of these are issues I’ve had and sorted to some degree. If anyone has helpful improvements to suggest then please don’t hesitate to comment. Well, at least hesitate long enough to make sense…

q.I can’t get Quake 3 to run with sound? What do I do!!!?? It says it can’t open /dev/dsp. Help ME!!!!

a.One reason for this could be that something else is using your sound card. Possibly the ARTS (KDE) or ESD (gnome/Enlightenemtn) sound deamons. Try to quit them before running quake3, either by opening the sound control centre settings and disableing or switching off the sound server. Or you can type

killall esd


killall artsd

from a terminal window.

Also, unfortunately some onboard (AC97) motherboard sound hardware doesn’t support all the functions Quake 3 requires and may give the /dev/dsp error. Some people have got around this by running quake3 with

artsdsp -m quake3


esdsp -m quake3

from a terminal. This unfortunately results in some noticable sound lag in game. The real solution for this is to go to ebay and buy an old SB Live! pci card if you really want to play Quake3 in linux. You can get them for less than a fiver.

q.I’m trying to get amarok to import my mp3 collection on a samba share but it keeps stopping in the middle of scanning and freezing my share totally. I the have to reset. What should I do?

a.The only solution I’ve found so far is to check the amarok collection log to see it has really halted with

tail -f .kde/share/apps/amarok/collection_scan.log

and then unmount the share with

sudo umount -l /<mnt or path to mounts>/<sharemount>/

and then immedietly

sudo mount /<mnt or path to mounts>/<sharemount>/

I’m sure there is a better way than this but I so far haven’t found it. Plus this doesn’t always work. It depends how choked up the samba mount has become.

q.How do I easily convert realaudio to mp3 on linux?

a.I’ve found the following works quite well. You need to have mplayer installed with the correct win32 codecs on your system (On my system they are kept in /usr/lib/win32/). You likely won’t get these with your distro for licensing reasons but will have them. For realaudio you really only need those codecs but you might want to grab the ‘all’ or ‘essential’ package if you use mplayer regularly.

Then it’s a case of:

mplayer -ao pcm -aofile output.wav input.ra

…to change the file to a wave. Then…

lame output.wav

…to encode to mp3. This should work with ra or rm. In the case of some audio streams like the BBC’s listen again streams you may find you need to edit the wave file using a wave editor of some kind to remove excess chatter from the start and end of the file. The BBC automate these recordings so there is usually the end of the previous program or the start of the next on the streams.

q.How do I do this with streaming audio?

a.If possible download the .ram file by right-clicking on the audio link and selecting save-as, and open it in a text editor of some kind. Even less from the command line should do. eg:

less stream.ram

Then paste the full contents (which should be an address beginning with rtsp://) to mplayer. eg:

mplayer -ao pcm -aofile output.wav rtsp://input.address/file

mplayer should then just play the stream silently and output the sound to a wave file called output.wav. This may take a while depending on the length of the audio stream. There may be a way to speed this up I don’t know about yet.

Once it is done you should be able to run:

lame output.wav

…to make an mp3. You can also stipulate the bitrate on the command line eg:

lame -b64 output.wav

…if you want a lower bitrate file since real-audio streams are usually of low quality anyway encoding at 128 or higher is usually just a waste of diskspace. Ultimately you’ll want an mp3 the same size or smaller than the source RealMedia file.

q.I’ve got multipart real-audio streams that I would like to combine into one large mp3. How would I go around doing this?


cat input01.wav input02.wav input03.wav input04.wav > output.wav

…which should combine the wave files you have outputed into one long wave file. Then you can encode it as an mp3 using lame.

q.I want to rename a dir of mp3s to add a 1 to the start of each filename. What’s the best/easiest way to go about it?


ls | (while read; do mv "$REPLY" "1${REPLY}"; done) (ta: petemc)

rename 's/(.*)/1$1/' * (ta: dw)

q. I don’t know what to do to configure my linux setup. I’m a novice user and all these text config files and rc’s and dotfiles look so intimidating. Should i give up now?

a. Nah, it’s a learning experience and it takes a while. No-one is born with the knowledge to use linux no matter what some people might profess. Try Webmin which I find to be quite reliable and easyish to use. It runs as a web server that you can connect t in a browser. Though it’s best not to make it public or you’ll have any old Tom Dick or Harry messing about with your system. DON’T use linuxconf as it’s shite and has caused me many many stressful hours of fixing stuff it’s screwed up.

q. Help. I’ve just installed/fucked up Procmail. It’s filtering incoming mail correctly but how can I run it on an established mailbox/maildir

a. Try:

cat * | formail -s procmail

…inside the maildir if you are using one. Or if you use mailbox (mbox) format use:

formail -s procmail < path/mbox

Personally I’ve found this takes forever (give or take a few minutes) possible it’s running at a low priorirty or something.


Here I’d like to take the opportunity to list and personally thank all those people who have given me much needed help with linux when I really needed it over the years.

So thanks goes out to (in no particular order): Me. Some other people. teh BLUG. Those few linux forums ( etc) that actual have helpful folk on them instead of snobby insecure geeks. No thanks to them. Anyone that refers to themselves as a “linux ninja” deserves to be faced off against real ninjas.

Something to say?