Ubuntu Tip: Turning PulseAudio On and Off - page 2
Overlapping Controls and Confusionpulseaudio is a stubborn little daemon. man pulseaudio says you can turn it off with the command pulseaudio --kill. But it won't stay killed-- it respawns itself. There is a normal init script to start it at boot, /etc/rc2.d/S50pulseaudio. But when you try controlling this the normal Linux way it doesn't work, because running /etc/init.d/pulseaudio stop doesn't stop it. Removing /etc/rc2.d/S50pulseaudio doesn't prevent it from starting at boot.
To stop its respawning habit, open /etc/pulse/client.conf, change autospawn = yes to autospawn = no, and set daemon-binary to /bin/true. Make sure these lines are uncommented, like this:
autospawn = no daemon-binary = /bin/trueNow we can deal with the normal Linux startup files. First delete /etc/rc2.d/S50pulseaudio. Or you may rename it to a kill command, which preserves the link in case you ever want it again:
# mv /etc/rc2.d/S50pulseaudio /etc/rc2.d/K50pulseaudioThis link may be named something else, like /etc/rc2.d/S03pulseaudio or some such, so verify the exact file name.
A useful trick, when you find scripts that start PulseAudio, is to change the binary that they call from /usr/bin/pulseaudio to /bin/true. This is a nice little executable whose only job is to "do nothing, successfully". It keeps the scripts happy, and it's a convenient placeholder if you ever want to change it back.
Now that you have purged all the startup and respawning scripts, how do you stop and start PulseAudio? Easy as pie:
$ pulseaudio --kill $ pulseaudio --startNow you are in charge, and that is the way it should be.
Carla Schroder is the author of the Linux Cookbook and the Linux Networking Cookbook (O'Reilly Media), the upcoming "Book of Audacity" (NoStarch Press), a lifelong book lover, and the managing editor of Linux Planet and Linux Today.
Sponsored by BlackBerry
BlackBerry® Enterprise Server Express enables businesses of any size to quickly and easily get started with the BlackBerry solution. It provides advanced BlackBerry smartphone features with no additional software or user license fees, and works with any Internet-enabled BlackBerry data plan or a BlackBerry enterprise data plan. Download now!