PDA

View Full Version : adding sound command



csindone
February 16th, 2005, 09:57 PM
I am new to linux. I have a program I run called mail-notification. There is a section for commands:

1. Mail reader: firefox http://gmail.com
2. When new mail arrives:
3. When all mail is read

As you can see I use Gmail and have added the command: firefox http://gmail.com

I would like to play a .wav file in the command When new mail arrives:

the .wav file is located in /home/chris/ problem is I don't know the command to play a sound

gogodidi
February 16th, 2005, 10:33 PM
are you asking to play a sound file when you receive a new email in your gmail account while using firefox?

I dont think there is anything that can be done about that, but if you mean thunderbird.. then... there is a section there, somewhere where you can change that...

csindone
February 16th, 2005, 10:49 PM
are you asking to play a sound file when you receive a new email in your gmail account while using firefox?

I dont think there is anything that can be done about that, but if you mean thunderbird.. then... there is a section there, somewhere where you can change that...

No I am looking for the command to play a sound file, with some Linux it's play or splay, but neither seems to work

ryu kun
September 11th, 2006, 02:56 PM
I am new to linux. I have a program I run called mail-notification. There is a section for commands:

1. Mail reader: firefox http://gmail.com
2. When new mail arrives:
3. When all mail is read

As you can see I use Gmail and have added the command: firefox http://gmail.com

I would like to play a .wav file in the command When new mail arrives:

the .wav file is located in /home/chris/ problem is I don't know the command to play a sound

You should install esound-clients first:


sudo apt-get install esound-clients

Then you can use this command to play a sound:


esdplay /home/filename.wav

CortalUX
March 21st, 2007, 11:58 PM
Although noting the date on this thread, I think some good information could be contributed for future reference, which would have especially helped me.
For one, there is now a shell script released under the GPL2 licence http://matthew.ruschmann.net/blog/Linux/gnome-gmail-1.1.html which allows you to have gmail as your default mailer, rather than firefox pointing to the site in all cases... so you can open a specific message in mail-notify upon recieving a mail, rather than having 'firefox www.gmail.com' in your gnome preferred applications or going through evolution.
The other thing, is that in feisty at least, the 'play' command comes in the 'sox' package from the universe repository [esounds didn't work for me].
So if the repository is enabled you can do this in a terminal.

sudo apt-get install sox
And then use this example to play a sound:

play ../../home/<USER>/<PATHTOSOUND>/sound.wav
Sorry if this is obvious, but I think it can be a good reference when you find information through searching the ubuntu forums.