I really don't know if this will help you. There are three parts to what I finally did. 1) I wrote a special script, 2) I found someplace to put it, and 3) I installed the script with update-alternatives.
1) here's the latest version of the script. It's not very good. I named it 'totem-replace.sh'.
Code:
#!/bin/sh
#use 'file' to figure out what kind of file it is.
if file $1 | grep "avi" > /dev/null
then
#start gmplayer
gmplayer "$1"
fi
#use 'file' to figure out what kind of file it is.
if file $1 | grep "mp3" > /dev/null
then
#start audacious
audacious "$1"
fi
2) I changed to root and put the script at '/usr/local/bin'. I chose this location somewhat arbitrarily.
3) I executed this statement with update-alternatives
Code:
update-alternatives --install /usr/bin/totem totem /usr/local/bin/totem-replace.sh 55
Some problems:
- The script launches audacious if it encounters an audio file, but audacious is broken for me in lenny right now. To play music right now I generally right click on the file and select xmms from the drop down menu.
- If the name of the file has the characters 'avi' in it, it tries to launch mplayer.
- This solution is basically for launching the right program when you double click on an icon. I don't know how to deal with streaming audio.
This should be reversible with update alternatives. You should read up on update-alternatives before you do anything like this. I think you type 'update-alternatives --config totem' and select from the list the old configuration.