Shutdown Sound

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/

copy the following into the script

#### 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/

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/ /etc/rc0.d/

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

Now I get a reboot and shutdown sound.


Tags: , , , , , , ,

One Response to “Shutdown Sound”

  1. Linux Mint のシャットダウン時に好きな音を鳴らしたい « 心穏やかに Says:

    […] なお、「Shutdown Sound」という記事も参考にしました。 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: