Log out sound on GNU/Linux GDM even easier

Well! If for some of you the previous instructions didn’t work just test this hack that David made for all of us:

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. 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:

#Put your custom commands after this line
aplay /usr/share/sounds/shutdown.wav

  1. 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. 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:

#Put your custom commands after this line
aplay /usr/share/sounds/shutdown.wav

  1. 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.

Be Sociable, Share!
  • Twitter
  • Facebook
  • email
  • StumbleUpon
  • Delicious
  • Google Reader
  • LinkedIn
  • BlinkList