Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Main Support Categories > General Help
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

General Help
All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu.

 
Thread Tools Display Modes
Old May 10th, 2008   #1
ebe326
5 Cups of Ubuntu
 
Join Date: Feb 2007
Beans: 21
shutdown sound

I did kind of a hack workaround for the no sound on shutdown problem some people are having. I just put together some other fixes I read about and so far it seems to work. The only problem is if you want to change the sound that is played requires modifying the script. Not that big a deal I guess. Anyway, this is what I did. In a terminal type "gksudo nautilus" without the quotes. Enter password and your now in nautilus with root privilege. Navigate to the /sbin folder. From the 'File' menu select 'Create Document' > 'Empty File'. It will create a file called “new file”. Open this file and add the following:

#!/bin/sh
#Put your custom commands after this line

aplay /usr/share/sounds/shutdown.wav

# The next line is the regular gnome logout command
/sbin/shutdown -h now "Shut Down via gdm."


Save the file and rename it “shutdown_mod”. Now make the file executable by right clicking on it then click on properties. Go to the 'Permissions' tab and check 'Allow executing file as program'. Close the properties window. Close Nautilus. Now go to the 'System' menu > 'Administration' > 'Login Window'. Click 'Edit Commands' at the bottom of the 'General' tab. Select 'Halt command' from the Command type box. Write down what you see in the Path box just in case you need to change it back. Now replace what's in the Path box with “/sbin/shutdown_mod” without the quotes. Now click 'Apply Command Changes' then close the window. Close the 'Login Window Preferences' window.

You should also do this for the reboot command. The only difference will be to name the file “reboot_mod” and add the following lines:

#!/bin/sh
#Put your custom commands after this line

aplay /usr/share/sounds/shutdown.wav

# The next line is the regular gnome logout command
/sbin/shutdown -r now "Rebooted via gdm."


Don't forget to make this file executable also. Now modify the 'Reboot command' in the 'Login Window' the same way you did before. Type “/sbin/reboot_mod” without the quotes in the Path box.

This worked for me on a fresh 8.04 install. As I said before, I just put this together using some other info I found in different places. I'm not really that knowledgeable about Linux so do this at your own risk. If anyone with more knowledge sees a problem with this, please let me know. Good luck.

david
ebe326 is offline   Reply With Quote
Old May 18th, 2008   #2
Kenneth D. Gladden
First Cup of Ubuntu
 
Join Date: Apr 2008
Beans: 5
Re: shutdown sound

Thanks - This worked for me.

jdg
Kenneth D. Gladden is offline   Reply With Quote
Old June 4th, 2008   #3
Yanski
First Cup of Ubuntu
 
Yanski's Avatar
 
Join Date: Jul 2007
Location: UK
My beans are hidden!
Ubuntu 8.04 Hardy Heron
Re: shutdown sound

Thanks for that David... it worked
Yanski is offline   Reply With Quote
Old June 4th, 2008   #4
exploder
Dark Roasted Ubuntu
 
Join Date: Apr 2007
Location: Hartford City, Indiana US
Beans: 1,006
Re: shutdown sound

ebe326, thank you! Your solution worked perfectly!
exploder is offline   Reply With Quote
Old June 5th, 2008   #5
blackmachine
First Cup of Ubuntu
 
blackmachine's Avatar
 
Join Date: Oct 2007
Beans: 8
Ubuntu 8.04 Hardy Heron
Re: shutdown sound

It works!! Thanx man. I've been searching this for days.
now I have my shutdown and reboot sound back. Cheers
blackmachine is offline   Reply With Quote
Old June 27th, 2008   #6
lukjad007
Fresh Brewed Ubuntu
 
lukjad007's Avatar
 
Join Date: Jul 2007
Location: The Shire, Canada
Beans: 1,288
Ubuntu 9.04 Jaunty Jackalope
Re: shutdown sound

First of all, thank you. I didn't know that there was a shutdown sound. Now though, we need to get to the serious part. I think that your hack was very well explained through and through. There was one thing that, though it was my fault entirely, made me stumble. When you said: "Now replace what's in the Path box with “/sbin/shutdown_mod” without the quotes." I took that to mean the WHOLE line. Again, my fault but someone else could make that mistake too. When I clicked apply I was whisked away from GNOME and dropped in what looked like a terminal gone rogue. I tried to do Ctrl+Backspace but got no response. I had to think back to my Window 98 days and hit Ctrl+Alt+Del to restart. Thank you for telling us to backup the line. Whew! Anyways none of the login sounds were working so I replaced the Path ONLY. Now it works perfectly.
Thanks again.
Luke
__________________
Another round of Ubuntu for my friends here!
Fighting to bring Pink back to The Pink Ponies archive.
DELETE INSANITY!
lukjad007 is offline   Reply With Quote
Old November 24th, 2008   #7
send4m3
5 Cups of Ubuntu
 
Join Date: Jul 2005
Beans: 24
Smile Re: shutdown sound

Hi.. I managed to do your step-by-step sound. Thanks... how to make it with logout sound ? please let me know in send4m3@yahoo.com

Thank you
send4m3 is offline   Reply With Quote
Old February 10th, 2009   #8
dcstar
Ubuntu addict and loving it
 
Join Date: Feb 2005
Location: Melbourne, Australia
Beans: 7,838
Ubuntu 9.04 Jaunty Jackalope
Re: shutdown sound

Quote:
Originally Posted by send4m3 View Post
Hi.. I managed to do your step-by-step sound. Thanks... how to make it with logout sound ? please let me know in send4m3@yahoo.com

Thank you
http://ubuntuforums.org/showthread.php?t=25857

I now have a (global) logout sound in my 8.04 system by doing the following:
  1. Installing the bplay package;
  2. Add the following to /etc/gdm/PostSession/Default (just before the "exit 0"):

    Code:
    bplay /pathto-wav/logout.wav
    (or where-ever your preferred sound is)
Hurrah!
__________________
Regards, David.

The Forum search function is useful for immediate help (give it a try).
Please mark your thread as "Solved" (using the Thread Tools) when appropriate.

Last edited by dcstar; February 10th, 2009 at 08:06 PM..
dcstar is offline   Reply With Quote
Old March 1st, 2009   #9
CheeseQueen452
Quad Shot of Ubuntu
 
CheeseQueen452's Avatar
 
Join Date: Nov 2006
Beans: 465
Send a message via Yahoo to CheeseQueen452
Re: shutdown sound

I tried this & it didn't work. Btw, I'm using Linux Mint which, under the hood, is basically the same as Ubuntu, so if it works in Ubuntu it should work in Mint.... Anywho, I've had no shutdown sound like many others here, I just hear a beep instead. So I attempted this procedure unsuccessfully, & I'm wondering if I entered the wrong path? I put "bplay /username/filename.wav".... should I put "home" before the username? If anyone can help me get this issue fixed, I'd greatly appreciate it!

Quote:
Originally Posted by dcstar View Post
http://ubuntuforums.org/showthread.php?t=25857

I now have a (global) logout sound in my 8.04 system by doing the following:
  1. Installing the bplay package;
  2. Add the following to /etc/gdm/PostSession/Default (just before the "exit 0"):

    Code:
    bplay /pathto-wav/logout.wav
    (or where-ever your preferred sound is)
Hurrah!
__________________
CheeseQueen452 is offline   Reply With Quote
Old March 1st, 2009   #10
linux_tech
Dark Roasted Ubuntu
 
linux_tech's Avatar
 
Join Date: Jul 2008
Location: /$home/bin
Beans: 1,054
Ubuntu Karmic Koala (testing)
Re: shutdown sound

works for me
__________________
Ubuntu 9.10 (Karmic Koala) testing
linux_tech is offline   Reply With Quote

Bookmarks

Tags
logout, shutdown, sound

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:39 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry