2 and 3 are quite easy (See below). Number 1 could be possible but I don't really know much about plymouth.
First off, create a small shell script containing these lines:
mpg123 -q $1 &
I chose to save it as
/usr/local/bin/play-sound (Also make sure mpg123 is installed).
You can use any command-line player you like. The
& at the end of the line is imortant since lightdm will wait untill the script finishes. And we want the sound to play during lightdm. And the
$1 will be replaced by whaterver file we specify when executing the script later on. Also remember to
chmod +x the script.
2 ) Edit
/etc/lightdm/lightdm.conf and set
greeter-setup-script=play-sound <file.mp3> somewhere in the
[SeatDefaults] section. Make sure the mp3 is accessible for all (not in an encrypted home folder or such). Don't use a long file as it will play it until the end.
3 ) Run
gnome-session-properties from a terminal or run-dialog. Click
Add, enter a nifty name, set the command to
play-sound <file.mp3>. Add a comment if you want. Click
Add and then
Close. This will make the selected file play when the current user logs in. If you want the file to play for all users just move the resulting file from
/usr/share/gnome/autostart/. I might add that there are more ways to set a login-sound for gnome. This is just a quick way.
I have tested these two solutions in ubuntu 11.10 running gnome-shell and unity. If I get some time over I will look in to the matter of running audio when plymouth runs. Or if anyone else knows ho to do this feel free to join in.