LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2007, 03:24 AM   #1
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Rep: Reputation: 30
I want to play a sound file when Firefox starts


Hi there

Sad I know, but I have a lovely .wav file of Homer Simpson saying 'Welcome to the internet...' that I'd like to play automatically when Firefox starts. It'll probably drive me mad after a short while, but I'd like to know how to do it anyway.

anyone any ideas?
 
Old 08-08-2007, 03:30 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
You could write a little wrapper-script to do this for you:

Code:
#!/bin/bash

# Play the sound
play /path/to/sound/file.wav
# Then launch the browser
/path/to/firefox
Save it on your desktop.
Add the FireFox icon to it to make it look like FireFox.

Job done!

Last edited by rizhun; 08-08-2007 at 03:31 AM.
 
Old 08-08-2007, 03:32 AM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
You could use mplayer, than do a small script like this:

Code:
#!/bin/sh
mplayer <your song.wav> && firefox
or something like that, I guess ^^

Last edited by Mega Man X; 08-08-2007 at 03:37 AM.
 
Old 08-08-2007, 03:33 AM   #4
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Rep: Reputation: 31
Quote:
#!/bin/bash

# Play the sound
play /path/to/sound/file.wav
# Then launch the browser
/path/to/firefox
Wow...
Thats a batch processing bash script...
It will only execute your Firefox after it finished playing the wav file...
 
Old 08-08-2007, 04:25 AM   #5
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Thanks for the replies. I will certainly give that approach a try if necessary. However, I was wondering if there was way of embedding it into Firefox itself? Somewhere in the 'user chrome' preferences maybe?

Thanks
 
Old 08-08-2007, 04:43 AM   #6
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Quote:
Originally Posted by ghostdev85
Wow...
Thats a batch processing bash script...
It will only execute your Firefox after it finished playing the wav file...
Alright - calm down.
Throw in a few ampersands
 
Old 08-08-2007, 06:01 AM   #7
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Yes, or simply invert the order.
 
Old 11-19-2007, 04:30 PM   #8
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Sorted it!

Just installed the add-on 'Splash' which gives a splash screen of your choice (can be blank) and starts a sound of your choice too.

 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto play a sound file just before linux stop ? zghh Linux - Software 1 01-11-2007 05:24 AM
mplayerplug-in - Firefox can't play more audio video file -- Please help me b:z Linux - Software 1 04-15-2005 06:04 AM
how to play sound file with c code? khucinx Programming 1 05-11-2004 06:28 AM
when i try to play a sound file with mpg123 or mpg321 i get an error VioLaToR Linux - Software 5 02-24-2004 12:25 PM
unable to play more than one sound file at a time. wonka_vision Linux - Hardware 2 06-10-2003 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration