PulseAudio on Kubuntu 8.10

This part was supposed to be a part of A Few Days In KDE 4 post, but I think it deserves its own post.

First of all, when I played with my new Kubuntu I realized that I forgot to backup PulseAudio settings. Damn. Anyway, this might be a good read for everybody else trying to get PulseAudio working, which I did in 20 minutes or so (most of the times spent downloading PulseAudio and everything else needed to make it work) to get my previous setup.

For a starter, I have to enable ALSA to use PulseAudio output, so I typed this into ~/.asoundrc:


pcm.pulse {
  type  pulse
}

ctl.pulse {
  type  pulse
}

This should enable PulseAudio audio playback on ALSA (the one I’m using right now and in the past).

Next I have to (re)configure PulseAudio server in this computer, just create another file at ~/.pulse/default.pa and put this in it:


load-module module-alsa-sink
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24

The first line should load the ALSA module to make PulseAudio use ALSA. The next one is to use native TCP protocol nothing fancy really, with a restriction on clients able to ‘send’ their sound to this computer. In this case I’m accepting sound from my local LAN (machines starting with “192.168” on their IP) and localhost (127.0.0.1); of course with extra precaution put on my firewall to block all entrance using PulseAudio port through unwanted network interfaces.

I tried to start PulseAudio for the first time by typing pulseaudio on the console. Right now not only that I know my settings working but I also got ~/.pulse-cookie created by PulseAudio. This is important because this is the cookie that allow the client computer, the one that provides playback, the one with MPD playing my songs, to connect to this computer. This is like public key in SSH, if you know what I’m talking about. Anyway what I have to do is to copy it to the remote machine to make PulseAudio authentication work; scp to the rescue!

At this stage PulseAudio should run as your everyday program, while what I want is to start as a daemon. So to make PulseAudio start as a background program, I created another file called ~/.pulse/daemon.conf and put this in it, a self-explanatory line:


daemonize=yes

After that when I started pulseaudio it works in the background, perfect. Now I can listen to music like I did before :D.

Advertisements

Leave a comment

Filed under Ilmu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s