Posts Tagged ‘Shutdown Sound’

Shutdown Sound

15, March 2011

Shutdown Sound:

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

$ sudo apt-get install ogg123

now add a script as follow script to /etc/init.d as follows

In a Terminal, create the file with, [change mousepad to your favourite text editor]

$ sudo mousepad /etc/init.d/K99shutdownsound.sh

copy the following into the script

#!/bin/sh
#### play sound at startup ####
## reduce volume ##
amixer -c 0 sset Master,0 50%
## play sound ##
/usr/bin/ogg123 /path_to my/shutdown.ogg

save the script and make it executable.

$ sudo chmod +x /etc/init.d/K99shutdownsound.sh

now add a shortcut to /etc/rc0.d where shutdown scripts go and to /etc/rc6.d where reboot scripts go

$ sudo ln -s /etc/init.d/K99shutdownsound.sh /etc/rc0.d/K99shutdownsound.sh

$ sudo ln -s /etc/init.d/K99shutdownsound.sh /etc/rc6.d/K99shutdownsound.sh

Now I get a reboot and shutdown sound.