Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: shutdown sound

  1. #1
    Join Date
    Feb 2007
    Beans
    22

    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

  2. #2
    Join Date
    Apr 2008
    Beans
    16

    Re: shutdown sound

    Thanks - This worked for me.

    jdg

  3. #3
    Join Date
    Jul 2007
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: shutdown sound

    Thanks for that David... it worked

  4. #4
    Join Date
    Apr 2007
    Location
    Hartford City, Indiana US
    Beans
    1,299
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: shutdown sound

    ebe326, thank you! Your solution worked perfectly!

  5. #5
    Join Date
    Oct 2007
    Beans
    8
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: shutdown sound

    It works!! Thanx man. I've been searching this for days.
    now I have my shutdown and reboot sound back. Cheers

  6. #6
    Join Date
    Jul 2007
    Location
    The Shire, Canada
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    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!

  7. #7
    Join Date
    Jul 2005
    Beans
    25

    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

  8. #8
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,509
    Distro
    Ubuntu 12.04 Precise Pangolin

    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!
    Last edited by dcstar; February 11th, 2009 at 01:06 AM.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  9. #9
    Join Date
    Nov 2006
    Beans
    465

    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!

  10. #10
    Join Date
    Jul 2008
    Location
    /$home
    Beans
    1,074
    Distro
    Ubuntu Development Release

    Re: shutdown sound

    works for me
    I'm not afraid of storms, for I sail my own ship

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •