This works for me: (you need sox installed. $sudo aptitude install sox) To sound when you logout, put this code in /etc/gdm/PostSession/Default:
#!/bin/sh sleep 1 nohup play /usr/share/sounds/ubuntu/stereo/desktop-logout.ogg & exit 0 It doesn't work without sleep 1, because the session closes too fast. To sound when you shutdown or reboot: - In /etc/init.d create a file called, for example, logout-sound. Assign it execution permission and put in it this content: #!/bin/sh play /usr/share/sounds/ubuntu/stereo/desktop-logout.ogg exit 0 - In /etc/rc0.d create a symbolic link to logout-sound /etc/rc0.d$sudo ln -s ../init.d/logout-sound S05logout-sound - Do the same for /etc/rc6.d And that's all. The sound first plays, and then the system closes, so please, don't play the 14 minutes song in a gadda da vida by Iron Butterfly :-) -- Logout/Shutdown Sound Not Working https://bugs.launchpad.net/bugs/214370 You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-session in ubuntu. -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs