Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Well here's an embarrassing problem. PulseAudio doesn't seem to be working. I've been trying to load the sound applet for a week or so and I checked ps aux | grep pulse and found that there's no PA daemon running!

Sound is still working. I assume everything has fallen back to ALSA.

Furthermore I've tried to start PA from the command line. pulseaudio -D just errors out with nothing useful, just E: main.c: Daemon startup failed.

pulseaudio on its own raises a little more:

$ pulseaudio
E: main.c: Unknown command: !/usr/bin/pulseaudio -nF
E: main.c: Failed to initialise daemon.

I can start it as root with --system but nothing can connect to it. That's not the right way to run PA, so I'd rather fix it than bodge around it.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Well that was the weirdest thing. I opened up /etc/pulse/default.pa and noticed that the first line was:

!/usr/bin/pulseaudio -nF

That looks an awful lot like a #!/bin/bash style opening (I don't know the proper name for it, comments on a postcard) so I stuck a hash at the beginning like so:

#!/usr/bin/pulseaudio -nF

And it works!

No idea how that got broken. I don't think I've ever purposefully edited that file before.

share|improve this answer
    
Very interesting finding - good to know that such things happen. Here the line is commented out per default installation. –  Takkat Jul 26 '11 at 17:03
    
@Takkat it's not a comment - it's a pulseaudio script. That "comment" tells it to run with the /usr/bin/pulseaudio executable (just as #!/bin/bash tells the OS to run a script with bash) –  Oli Jul 26 '11 at 18:29
1  
Chat (marco and htorque) reliably tell me this like is called a Interpreter directive (a shebang (#!) followed by a command). –  Oli Jul 26 '11 at 18:36
    
thank you for the additional information :) –  Takkat Jul 26 '11 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.