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.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Knoppix 7.3, Slacko Puppy 5.7 and PC-BSD 10.0.1