Start up Sound

Start up Sound:

This works on my Xubuntu Natty install. I found a .ogg sound file that I wanted to use as a start up sound so needed an command line ogg player to play it.

$ sudo apt-get install ogg123

Now create a script in /usr/bin as follows [replace mousepad with the text editor of your choice];

$ sudo mousepad /usr/bin/startup

Add the following to the file

#!/bin/sh
#### play sound at startup ####
## reduce volume ##
sleep 5
StartupNotify=false
/usr/bin/amixer -c 0 sset Master,0 60%
## play sound ##
/usr/bin/ogg123 /path_to_my/sartupsound.ogg
## increase volume again ##
/usr/bin/amixer -c 0 sset Master,0 85%

save the script and make it executable with.

$ sudo chmod +x /usr/bin/startup

Now add the script to the system start up, in Xubuntu open [Settings], [Settings Manager], [Session and Startup], [Application Autostart], and then the [Add] button. Add a name of your choice in the Name field, and the same in the Description field, then the path to your script in the Command field i.e /usr/bin/startup in this case the [ok] to finish. You will then get a startup sound next time you log on.

Tags: , , , , , , , ,

Leave a comment