https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dimitar&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:43:03ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=PulseAudio&diff=232284PulseAudio2012-10-28T20:26:03Z<p>Dimitar: /* Troubleshooting */ Choppy Sound with Analog Surround Sound Setup</p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[cs:PulseAudio]]<br />
[[es:PulseAudio]]<br />
[[fr:PulseAudio]]<br />
[[it:PulseAudio]]<br />
[[pt:PulseAudio]]<br />
[[ru:PulseAudio]]<br />
[[tr:PulseAudio]]<br />
{{Article summary start}}<br />
{{Article summary text|'''PulseAudio''' is a general purpose sound server. For a list of features, see [[Wikipedia:PulseAudio#Features]].}}<br />
{{Article summary heading|Related Articles}}<br />
{{Article summary wiki|PulseAudio/Examples}}<br />
{{Article summary end}}<br />
<br />
==Installation==<br />
*Required PKG: {{Pkg|pulseaudio}}<br />
*Optional GUIs: {{Pkg|paprefs}} and {{Pkg|pavucontrol}}<br />
*Optional volume control via mapped keyboard keys: {{AUR|pulseaudio_ctl}}<br />
*Optional console mixer: {{AUR|ponymix-git}} and {{AUR|pamixer-git}}<br />
*Optional system tray icon: {{AUR|pasystray-git}}<br />
*Optional kde plasma applet: {{AUR|kdeplasma-applets-veromix}}<br />
<br />
==Running==<br />
{{Note|Pulseaudio requires dbus to function. This is very likely already added in the daemons array, if not consider adding it.}}<br />
{{Note|Most X11 environments start pulseaudio automatically with the X11 session.}}<br />
<br />
In the unlikely event that pulseaudio is not automatically called upon entering X, it can can be started with:<br />
$ pulseaudio --start<br />
<br />
PulseAudio can be stopped with:<br />
$ pulseaudio --kill<br />
<br />
==Equalizer==<br />
<br />
Newer pulseaudio versions have an intergrated 10-band equalizer system. In order to use the equalizer do the following:<br />
<br />
===Load equalizer sink module===<br />
<br />
$ pactl load-module module-equalizer-sink<br />
<br />
===Install and run the gui frontend===<br />
<br />
# pacman -S --needed python2-pyqt<br />
<br />
$ qpaeq<br />
<br />
{{Note|If qpaeq has no effect, install pavucontrol and change "ALSA Playback on" to "FFT based equalizer on ..." while the media player is running.}}<br />
<br />
===Load equalizer module on every boot===<br />
<br />
Edit the file {{ic|/etc/pulse/default.pa}} with your favorite editor and append the following lines:<br />
<br />
### Load the integrated pulseaudio equalizer module<br />
load-module module-equalizer-sink<br />
<br />
==Backend Configuration==<br />
<br />
{{Out of date|Arch has moved to systemd and rc.conf is now deprecated.}}<br />
<br />
===ALSA===<br />
*Recommended PKG: {{Pkg|pulseaudio-alsa}}<br />
*Optional PKGs: {{Pkg|lib32-libpulse}} and {{Pkg|lib32-alsa-plugins}}<br />
<br />
{{Note|Optional PKGs are needed only if running x86_64 and wanting to have sound for 32 bit programs (like Wine).}}<br />
<br />
For the applications that do not support PulseAudio and support ALSA it is '''recommended''' to install the PulseAudio plugin for ALSA. This package also contains the necessary {{ic|/etc/asound.conf}} for configuring ALSA to use PulseAudio.<br />
<br />
To prevent applications from using ALSA's OSS emulation and bypassing Pulseaudio (thereby preventing other applications from playing sound), make sure the module {{ic|snd_pcm_oss}} is not in the {{ic|MODULES}} array in {{ic|/etc/[[rc.conf]]}}. If it is currently loaded, disable it by executing:<br />
# rmmod snd_pcm_oss<br />
<br />
===OSS===<br />
There are multiple ways of making OSS-only programs play to PulseAudio:<br />
<br />
====ossp====<br />
Start {{Pkg|ossp}} with:<br />
rc.d start osspd<br />
<br />
Afterwards, add it to DAEMONS in {{ic|rc.conf}}.<br />
<br />
====padsp wrapper (part of PulseAudio)====<br />
Programs using OSS can work with PulseAudio by starting it with padsp:<br />
<br />
$ padsp OSSprogram<br />
A few examples:<br />
$ padsp aumix<br />
$ padsp sox foo.wav -t ossdsp /dev/dsp<br />
<br />
One can also rename the {{ic|OSSprogram-bin}} binary and replace it with a script like this: <br />
{{hc|/usr/bin/OSSProgram|<nowiki><br />
#!/bin/sh<br />
if test -x /usr/bin/padsp; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-bin "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<br />
</nowiki>}}<br />
<br />
===GStreamer===<br />
To make [[GStreamer]] use PulseAudio, you need to install {{Pkg|gstreamer0.10-good-plugins}}, execute {{ic|gstreamer-properties}} (part of ''gnome-media'' package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{ic|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{ic|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc<br />
<br />
Some applications (like Rhythmbox) ignore the ''audiosink'' property, but rely instead on ''musicaudiosink'', which cannot be configured using {{ic|gstreamer-properties}} but needs to be manually set using {{ic|gconf-editor}} or the {{ic|gconftool-2}}:<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink<br />
<br />
===OpenAL===<br />
OpenAL Soft should use PulseAudio by default, but can be explicitly configured to do so: {{hc|/etc/openal/alsoft.conf|2=drivers=pulse,alsa}}<br />
<br />
===libao===<br />
Edit the libao configuration file:<br />
{{hc|/etc/libao.conf|2=default_driver=pulse}}<br />
<br />
===ESD===<br />
PulseAudio is a drop-in replacement for the enlightened sound daemon (ESD). While PulseAudio is running, ESD clients should be able to output to it without configuration.<br />
<br />
==Desktop Environments==<br />
===General X11===<br />
{{Note|As mentioned previously, PulseAudio is very likely launched automatically via either {{ic|/etc/X11/xinit/xinitrc.d/pulseaudio}} or the files in {{ic|/etc/xdg/autostart/}} if users have some DE installed.}}<br />
<br />
Check to see if PulseAudio is running:<br />
<br />
$ ps aux | grep pulse<br />
facade 1794 0.0 0.0 360464 6532 ? S<l 15:33 0:00 /usr/bin/pulseaudio --start<br />
facade 1827 0.0 0.0 68888 2608 ? S 15:33 0:00 /usr/lib/pulse/gconf-helper<br />
<br />
If Pulseaudio is not running and users are using X, the following will start PulseAudio with the needed the X11 plugins manually:<br />
$ start-pulseaudio-x11<br />
<br />
If you are not running Gnome, KDE or XFCE and your {{ic|~/.xinitrc}} does not source the scripts in {{ic|/etc/X11/xinit/xinitrc.d}} (such as is done in the example file {{ic|/etc/skel/.xinitrc}}) then you can launch PulseAudio on boot by adding the following line to ~/.xinitrc:<br />
/usr/bin/start-pulseaudio-x11<br />
<br />
===GNOME===<br />
As of GNOME 3, GNOME fully integrates with PulseAudio and no extra configuration is needed.<br />
<br />
===KDE 3===<br />
PulseAudio is ''not'' a drop-in replacement for aRts. Users of KDE 3 cannot use PulseAudio. However note, recent versions of puleaudio may have eliminated the prohibition:<br />
<br />
See: http://www.pulseaudio.org/wiki/PerfectSetup KDE 3 uses the artsd sound server by default. However, artsd itself can be configured to use an Esound backend. Edit kcmartsrc (either in /etc/kde or /usr/share/config for global configuration or .kde/share/config to configure only one user) like this:<br />
<br />
[Arts]<br />
Arguments=\s-F 10 -S 4096 -a esd -n -s 1 -m artsmessage -c drkonqi -l 3 -f<br />
NetworkTransparent=true<br />
SuspendTime=1<br />
<br />
===KDE 4 and Qt4===<br />
PulseAudio, it will be used by KDE4/Qt4 applications. For more information see the [http://www.pulseaudio.org/wiki/KDE KDE page in the PulseAudio wiki].<br />
<br />
One useful tidbit from that page is to add {{ic|load-module module-device-manager}} to {{ic|/etc/pulse/default.pa}}.<br />
<br />
Additionally, the {{AUR|kdeplasma-applets-veromix}} is available in the [[AUR]] as a KDE alternative to pavucontrol.<br />
<br />
===XFCE4===<br />
Applications running under XFCE4 can take advantage of Pulseaudio. To manage Pulseaudio settings you can use {{Pkg|pavucontrol}}.<br />
<br />
==Applications==<br />
===Audacious===<br />
[[Audacious]] natively supports PulseAudio. In order to use it, set Audacious Preferences -> Audio -> Current output plugin to 'PulseAudio Output Plugin'.<br />
<br />
===Java/OpenJDK 6===<br />
Create a wrapper for the java executable using padsp as seen on the [[Java#Java_sound_with_Pulseaudio|Java sound with Pulseaudio]] page.<br />
<br />
===Music Player Daemon (MPD)===<br />
[http://mpd.wikia.com/wiki/PulseAudio configure] [[MPD]] to use PulseAudio.<br />
<br />
===MPlayer===<br />
[[MPlayer]] natively supports PulseAudio output with the "{{ic|-ao pulse}}" option. It can also be configured to default to PulseAudio output, in {{ic|~/.mplayer/config}} for per-user, or {{ic|/etc/mplayer/mplayer.conf}} for system-wide:<br />
{{hc|/etc/mplayer/mplayer.conf|2=ao=pulse}}<br />
<br />
===Skype (x86_64 only)===<br />
Install {{Pkg|lib32-libpulse}}, otherwise the following error will occur when trying to initiate a call: "Problem with Audio Playback".<br />
<br />
==Troubleshooting==<br />
===No sound after install===<br />
<br />
====Muted audio device====<br />
If one experiences no audio output via any means while using ALSA, attempt to unmute the sound card. To do this, launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')<br />
$ alsamixer -c 0<br />
<br />
====Bad configuration files====<br />
If after starting pulseaudio, the system outputs no sound, it may be necessary to delete the contents of {{ic|~/.pulse}}. Pulseaudio will automatically create new configuration files on its next start.<br />
<br />
====Flash Content====<br />
Since Adobe Flash does not directly support PulseAudio the recommended way is to [https://wiki.archlinux.org/index.php/PulseAudio#ALSA configure ALSA to use the virtual PulseAudio soundcard].<br />
<br />
Alternatively you may try out {{AUR|libflashsupport-pulse}} from the [[AUR]].<br />
{{Note|This may invariably crash the flash plugin.}}<br />
<br />
====No cards====<br />
If PulseAudio starts, run {{ic|pacmd list}}. If no cards are reported, make sure that the ALSA devices are not in use:<br />
$ fuser -v /dev/snd/*<br />
$ fuser -v /dev/dsp<br />
<br />
Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.<br />
<br />
====The only device shown is "dummy output"====<br />
This may be caused by different reasons, one of them being the .asoundrc file in $HOME is taking precedence over the systemwide /etc/asound.conf.<br />
<br />
The user file is modified also by the tool '''asoundconf''' or by its graphical variant '''asoundconf-gtk''' (the latter is named "Default sound card" in the menu) as soon as it runs. Prevent the effects of .asoundrc altogether by commenting the last line like this:<br />
<br />
#</home/<yourusername>/.asoundrc.asoundconf><br />
<br />
====KDE4====<br />
It may be that another output device set as preferred in phonon. Make sure that every setting reflects the preferred output device at the top, and check the playback streams tab in kmix to make sure that applications are using the device for output.<br />
<br />
===Bluetooth headset replay problems===<br />
Some user [https://bbs.archlinux.org/viewtopic.php?id=117420 report] huge delays or even no sound when the bluetooth connection does not send any data. This is due to an idle-suspend-module that puts the related sinks/sources automatically into suspend. As this can cause problems with headset, the responsible module can be deactivated. <br />
<br />
1. cp /etc/pulse/default.pa ~/.pulse/default.pa<br />
2. comment out the "load-module module-suspend-on-idle" line in ~/.pulse/default.pa<br />
3. pulseaudio -k && pulseaudio --start<br />
<br />
[http://robert.orzanna.de/2011/08/10/prevent-idle-suspend-with-a-bluetooth-headset-and-a2dp/ More information]<br />
<br />
===Automatically switch to Bluetooth or USB headset===<br />
Add the following to your /etc/pulse/default.pa:<br />
<br />
# automatically switch to newly-connected devices<br />
load-module module-switch-on-connect<br />
<br />
===Pulse overwrites ALSA settings===<br />
Pulseaudio usually overwrites the ALSA settings- for example set with alsamixer- at start up, even when the alsa daemon is loaded. Since there seems to be no other way to restrict this behaviour, a workaround is to restore the alsa settings again after pulseaudio had started. Add the following command to {{ic|.xinitrc}} {{ic|.bash_login}} or any other autostart file:<br />
<br />
restore_alsa() {<br />
while [ -z "`pidof pulseaudio`" ]; do<br />
sleep 0.5<br />
done<br />
alsactl -f /var/lib/alsa/asound.state restore <br />
}<br />
restore_alsa &<br />
<br />
===Daemon startup failed===<br />
Try resetting PulseAudio. To do that:<br />
$ pulseaudio --kill<br />
$ killall pulseaudio<br />
$ killall -9 pulseaudio<br />
$ rm -rf ~/.pulse*<br />
$ rm -rf /tmp/pulse*<br />
<br />
Afterwards, start PulseAudio again.<br />
<br />
===padevchooser===<br />
If one cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ rc.d restart avahi-daemon<br />
<br />
===Glitches, skips or crackling===<br />
The newer implementation of PulseAudio sound server uses a timer-based audio scheduling instead of the traditional interrupt-driven approach. <br />
<br />
Timer-based scheduling may expose issues in some ALSA drivers. On the other hand, other drivers might be glitchy without it on, so check to see what works on your system. <br />
<br />
To turn timer-based scheduling off, replace the line:<br />
load-module module-udev-detect <br />
in {{ic|/etc/pulse/default.pa}} by:<br />
load-module module-udev-detect tsched=0<br />
Then restart the PulseAudio server.<br />
<br />
Do the reverse to enable timer-based scheduling, if not already enabled by default.<br />
<br />
Please report any such cards to [http://pulseaudio.org/wiki/BrokenSoundDrivers PulseAudio Broken Sound Driver page]<br />
<br />
===Laggy sound===<br />
This issue is due to incorrect buffer sizes.<br />
Edit {{ic|/etc/pulse/daemon.conf}}<br />
<br />
Either disable any modifications (if any) to these entries, or, if issue still exists, uncomment and change them in the following way:<br />
default-fragments = 8<br />
default-fragment-size-msec = 5<br />
<br />
===Choppy, overdriven sound===<br />
Choppy sound in pulsaudio can result from wrong settings for the sample rate in {{Ic|/etc/pulse/daemon.conf}}. Try changing the line <br />
; default-sample-rate = 44100<br />
to <br />
default-sample-rate = 48000<br />
and restart the PulseAudio server.<br />
<br />
If one experiences choppy sound in applications using openAL, change the sample rate in /etc/openal/alsoft.conf:<br />
frequency = 48000<br />
<br />
Setting the PCM volume above 0dB can cause clipping of the audio signal. Running {{ic|alsamixer -c0}} will allow you to see if this is the problem and if so fix it.<br />
<br />
===Volume adjustment does not work properly===<br />
Check:<br />
{{ic|/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common}}<br />
<br />
If the volume does not appear to increment/decrement properly using {{ic|alsamixer}} or {{ic|amixer}}, it may be due to pulseaudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. {{ic|amixer set Master 655+}}).<br />
<br />
===Volume gets louder every time a new application is started===<br />
Per default, it seems as if changing the volume in an application sets the global system volume to that level instead of only affecting the respective application. Applications setting their volume on startup will therefore cause the system volume to "jump".<br />
<br />
Fix this by uncommenting <br />
flat-volumes = no<br />
in<br />
/etc/pulse/daemon.conf<br />
and then restarting PulseAudio by executing<br />
pulseaudio --kill && pulseaudio --start<br />
<br />
When Pulse comes back after a few seconds, applications will not alter the global system volume anymore but have their own volume level again.<br />
<br />
{{Note|A previously installed and removed pulseaudio-equalizer may leave behind remnants of the setup in {{Ic|$HOME/.pulse/default.pa}} which can also cause maximized volume trouble. Comment that out as needed.}}<br />
<br />
===No mic on ThinkPad T400/T500/T420===<br />
Run<br />
alsamixer -c 0<br />
Maximize the volume of/unmute the "Internal Mic".<br />
<br />
Once you see the device with<br />
arecord -l<br />
you might still need to adjust the settings. The microphone and the audio jack are duplexed. Set the configuration of the internal audio in pavucontrol to ''Analog Stereo Duplex''.<br />
<br />
===No mic input on Acer Aspire One===<br />
Install pavucontrol, unlink the microphone channels and turn down the left one to 0.<br />
Reference: http://getsatisfaction.com/jolicloud/topics/deaf_internal_mic_on_acer_aspire_one#reply_2108048<br />
<br />
===Sound output is only mono on M-Audio Audiophile 2496 sound card===<br />
Add the following to /etc/pulseaudio/default.pa:<br />
load-module module-alsa-sink sink_name=delta_out device=hw:M2496 format=s24le channels=10 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7<br />
load-module module-alsa-source source_name=delta_in device=hw:M2496 format=s24le channels=12 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9<br />
set-default-sink delta_out<br />
set-default-source delta_in<br />
<br />
===Static Noise in Microphone Recording===<br />
If we are getting static noise in skype, gnome-sound-recorder, arecord, etc.'s recordings then the sound card samplerate is incorrect. That is why there is static noise in linux microphone recordings. To fix this We need to set sample-rate in /etc/pulse/daemon.conf for the sound hardware.<br />
<br />
====1. Determine soundcards in the system====<br />
This requires alsa-utils and related packages to be installed:<br />
$ arecord --list-devices<br />
<br />
output:<br />
**** List of CAPTURE Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 2: ALC888 Analog [ALC888 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
<br />
soundcard is hw:0,0<br />
<br />
====2. Determine sampling-rate of the sound card====<br />
arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav<br />
<br />
output:<br />
"Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo<br />
Warning: rate is not accurate (requested = 60000Hz, '''got = 96000Hz''')<br />
please, try the plug plugin<br />
<br />
observe, the '''got = 96000Hz''', this is the max sample-rate of our card.<br />
<br />
====3. Setting the soundcard's sampling rate into pulse audio configuration====<br />
the default sample-rate in pulseaudio is<br />
grep "sample-rate" /etc/pulse/daemon.conf<br />
<br />
output:<br />
; default-sample-rate = 44100<br />
<br />
It is 44100 and is disabled. Let us set our sound card's settings into pulseaudio configuation file<br />
su -c "sed 's/; default-sample-rate = 44100/default-sample-rate = 96000/g' -i /etc/pulse/daemon.conf"<br />
<br />
Let us verify the changes to deamon.conf<br />
grep "sample-rate" /etc/pulse/daemon.conf <br />
output:<br />
default-sample-rate = 96000<br />
and it is done.<br />
<br />
====4. Restart pulseaudio to apply the new settings====<br />
pulseaudio --kill<br />
pulseaudio --start<br />
<br />
====5. Finally check by recording and playing it back====<br />
Let us record some voice using mic for say 10 seconds. Make sure the mic is not muted and all<br />
arecord -f cd -d 10 test-mic.wav<br />
<br />
After 10 seconds, let us play the recording...<br />
aplay test-mic.wav<br />
<br />
Now hopefully, there is no static noise in microphone recording anymore.<br />
<br />
=== My Bluetooth device is paired but does not play any sound ===<br />
[[Bluetooth#My_device_is_paired_but_no_sound_is_played_from_it|See the article in Bluetooth section]]<br />
<br />
=== Subwoofer stops working after end of every song ===<br />
Known issue: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/494099<br />
<br />
To fix this, must edit: {{ic|/etc/pulse/daemon.conf}} and enable {{ic|enable-lfe-remixing}} :<br />
{{hc|/etc/pulse/daemon.conf|<nowiki><br />
enable-lfe-remixing = yes<br />
</nowiki>}}<br />
<br />
=== Pulseaudio uses wrong microphone ===<br />
If Pulseaudio uses the wrong microphone, and changing the Input Device with Pavucontrol did not help, take a look at alsamixer. It seems that Pavucontrol does not always set the input source correctly.<br><br />
Run:<br />
<br />
$ alsamixer<br />
<br />
press F6 and choose your sound card, e.g. HDA Intel. Now press F5 to display all items. Try to find the item: {{ic|Input Source}}. With the up/down arrow keys you are able to change the input source. <br><br />
Now try if the correct microphone is used for recording.<br />
<br />
=== Choppy Sound with Analog Surround Sound Setup ===<br />
<br />
The low-frequency effects (LFE) channel is not remixed per default. To enable it the following needs to be set in {{ic|/etc/pulse/daemon.conf}} :<br />
{{hc|/etc/pulse/daemon.conf|<nowiki><br />
enable-lfe-remixing = yes<br />
</nowiki>}}<br />
<br />
==External links==<br />
*[http://www.pulseaudio.org/wiki/PerfectSetup http://www.pulseaudio.org/wiki/PerfectSetup] - A good guide to make your configuration perfect<br />
*[http://www.alsa-project.org/main/index.php/Asoundrc http://www.alsa-project.org/main/index.php/Asoundrc] - Alsa wiki on .asoundrc<br />
*[http://www.pulseaudio.org/ http://www.pulseaudio.org/] - PulseAudio official site<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Dimitarhttps://wiki.archlinux.org/index.php?title=Avahi&diff=148520Avahi2011-07-08T10:04:50Z<p>Dimitar: /* Link-Local XMPP Chat */ Fixed title</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[http://avahi.org/ Avahi] is a free Zeroconf (Zero Configuration Networking) implementation, including a system for multicast DNS/DNS-SD service discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. It is licensed under the GNU Lesser General Public License (LGPL). (Source: [[Wikipedia:Avahi (software)]])<br />
<br />
== Installation ==<br />
Install Avahi with:<br />
<pre><br />
# pacman -S avahi nss-mdns<br />
</pre><br />
After installing Avahi you will need to restart the ''dbus'' daemon before you can start ''avahi-daemon''.<br />
<br />
To start Avahi at boot, add ''avahi-daemon'' to the DAEMONS line of /etc/rc.conf. Note that ''avahi-daemon'' must be started after the ''dbus'' daemon.<br />
<br />
For some reason, I (ArcherSeven) have found that adding avahi-daemon to /etc/rc.conf loads it too early and it fails. To get around this, I added it as '/etc/rc.d/avahi-daemon start' to /etc/rc.local. Might be worth a try if you have issues. (This despite it being the last loaded daemon in rc.conf)<br />
<br />
== Using Avahi ==<br />
<br />
=== Hostname resolution ===<br />
Avahi also allows you to access computers using their hostnames. '''Note:''' you must install <tt>nss-mdns</tt> for this to work.<br />
<br />
Suppose you have machines with names maple, fig and oak, all running avahi. Avahi can be set up so that you don't have to manage a <tt>/etc/hosts</tt> file for each computer. Instead you can simply use <tt>maple.local</tt> to access whatever services <tt>maple</tt> has. However by default, .local querying is disabled in Arch Linux. To enable it edit the file <tt>/etc/nsswitch.conf</tt> and change the line:<br />
hosts: files dns<br />
to<br />
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4<br />
<br />
A small section of users in Ubuntu noticed a slowdown in DNS querying; it was attributed to this change. Whether it applies to Arch Linux too, is not known. (Reference: [https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940 Ubuntu Bug 94940]) -- I found this to be true for Arch; However, I just used the line:<br />
hosts: files mdns4_minimal dns mdns4<br />
and I get the correct behavior without slower DNS.<br />
<br />
{{Note|I had to remove '''mdns''' completely to prevent slowdowns. However, '''mdns_minimal''' alone appeared to be sufficient.}} <br />
<br />
Avahi also has quite a few nifty utilities which can help you discover which services are being used on a network. <br />
The <tt>avahi-discover</tt> (Avahi Zeroconf Browser) shows the various services on your network. You can also browse SSH and VNC Servers using <tt>bssh</tt> and <tt>bvnc</tt> respectively.<br />
<br />
There's a good list of software with Avahi support at their website: http://avahi.org/wiki/Avah4users<br />
<br />
===File Sharing===<br />
<br />
====NFS====<br />
If you have an [[NFS]] share set up, you can use Avahi to be able to automount them in zeroconf-enabled browsers (such as Konqueror on KDE and Finder on Mac OS X). Create a .service file in /etc/avahi/services with the following:<br />
<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>Zephyrus Shared Music</name><br />
<service><br />
<type>_nfs._tcp</type><br />
<port>2049</port><br />
<txt-record>path=/data/shared/Music</txt-record><br />
</service><br />
</service-group><br />
<br />
The port is correct if you have ''insecure'' as an option in your /etc/exports; otherwise, it needs to be changed (note that ''insecure'' is needed for OS X clients). The path is the path to your export, or a subdirectory of it. For some reason the automount functionality has been removed from Leopard, however [http://www.macosxhints.com/article.php?story=20071116042238744 a script is available]. This was based upon [http://ubuntuforums.org/showthread.php?p=4387032#post4387032 this post].<br />
<br />
====GShare====<br />
You can grab [[gshare]] from [community] and have shared files between the LAN, with no configuration, no hours in samba hacking, no nothing - it just works.<br />
<br />
====Vsftpd====<br />
Sourced from [http://ubuntuforums.org/showthread.php?t=218630 ubuntuforums.org].<br />
If you would rather use a regular ftp service, install vsftpd and avahi. Change the settings of vsftpd according to what is shown on the ubuntuforums page or according to your own personal preferences (See 'man vsftpd.conf).<br />
<br />
Create a ftp.service file in /etc/avahi/services and paste in that file<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>FTP file sharing</name><br />
<service><br />
<type>_ftp._tcp</type><br />
<port>21</port><br />
</service><br />
</service-group><br />
When you are done, (re)start avahi-daemon and vsftpd in your /etc/rc.d directory.<br />
/etc/rc.d/avahi-daemon restart<br />
/etc/rc.d/vsftpd restart<br />
<br />
You might need to add the following to your /etc/hosts.allow file, so that any person can attempt to log in to your ftp site. See 'man hosts.allow' for other settings that you might want.<br />
'vsftpd: ALL' <br />
<br />
After that you should be able to browse through the ftp server from another computer in your network. The steps shown in this section are created so that the ftp server is 'advertised' by avahi to the local Zeroconf network.<br />
<br />
Unless you are using GNOME or KDE, you might not be able to log in to the ftp server directly through your file manager, and so you will have to use a ftp client pointed to the IP address of the server or the hostname of the machine (as shown in [[Avahi#Hostname_resolution|this section]]).<br />
<br />
====Giver====<br />
[http://code.google.com/p/giver/ Giver] is a mono program that allows simple file-sharing between two desktops when both are running Giver. All you need to do is click and drag the file to the name or picture of the person you wish to send the file to.<br />
<br />
A package is on the [http://aur.archlinux.org/packages.php?ID=17139 AUR].<br />
<br />
Note that this depends on gnome-sharp, which has heavy GNOME dependencies.<br />
<br />
===Link-Local XMPP Chat===<br />
Link-Local XMPP clients need TCP port 5298 allowed for incoming connections. Check [[Simple_stateful_firewall_HOWTO#Opening_ports_to_incoming_connections|Simple stateful firewall: opening ports to incoming connections]] for more details if you use iptables.<br />
<br />
====Pidgin====<br />
[http://www.pidgin.im Pidgin] is an instant messaging client that supports quite a few commonly used IM protocols. In addition to these, it supports Bonjour.<br />
<br />
Just select 'Bonjour' as the protocol type when you add an account, and enter a username. The first and last name you enter in the 'Advanced' tab will be what the other person (whom you are chatting with) sees, and 'local alias' under 'User Options' in the 'Basic' tab will be what you see of your own name (you could try putting in something like I, me or myself).<br />
<br />
Once this is done, other Pidgin (iChat) users who are on the local network will see you and be able to chat with you. To implement file-sharing, you just send and receive files like you would do with a regular IM session.<br />
<br />
====Kopete====<br />
[http://kopete.kde.org/ Kopete] is the KDE equivalent of Pidgin. It supports the Bonjour/Link-local XMPP protocol. One need to create an account in Kopete, by simply entering the desired name.<br />
<br />
====Telepathy====<br />
[http://telepathy.freedesktop.org Telpathy] is a communication framework which supports different protocols using plugins. The [http://www.archlinux.org/packages/?sort=&q=telepathy-salut&maintainer=&last_update=&flagged=&limit=50 Telepathy Salut] plugin provides support for Bonjour/Link-Local XMPP protocol. Empathy is a GNOME front-end to Telepathy. Officially, KDE does not support Telepathy, but work is going on which will eventually replace Kopete. Development version of KDE Telepathy is available in [https://aur.archlinux.org/packages.php?O=0&K=telepathy&do_Search=Go AUR].<br />
<br />
== External Resources ==<br />
* [http://avahi.org/ Avahi] - Official project website<br />
* [http://en.wikipedia.org/wiki/Avahi_%28software%29 Wikipedia entry]<br />
* [http://www.apple.com/support/downloads/bonjourforwindows.html Bonjour for Windows] - Enable zeroconf on Windows</div>Dimitarhttps://wiki.archlinux.org/index.php?title=Avahi&diff=148476Avahi2011-07-06T19:42:42Z<p>Dimitar: /* Link-Local XMPP Chat */ fixed internal link</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[http://avahi.org/ Avahi] is a free Zeroconf (Zero Configuration Networking) implementation, including a system for multicast DNS/DNS-SD service discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. It is licensed under the GNU Lesser General Public License (LGPL). (Source: [[Wikipedia:Avahi (software)]])<br />
<br />
== Installation ==<br />
Install Avahi with:<br />
<pre><br />
# pacman -S avahi nss-mdns<br />
</pre><br />
After installing Avahi you will need to restart the ''dbus'' daemon before you can start ''avahi-daemon''.<br />
<br />
To start Avahi at boot, add ''avahi-daemon'' to the DAEMONS line of /etc/rc.conf. Note that ''avahi-daemon'' must be started after the ''dbus'' daemon.<br />
<br />
For some reason, I (ArcherSeven) have found that adding avahi-daemon to /etc/rc.conf loads it too early and it fails. To get around this, I added it as '/etc/rc.d/avahi-daemon start' to /etc/rc.local. Might be worth a try if you have issues. (This despite it being the last loaded daemon in rc.conf)<br />
<br />
== Using Avahi ==<br />
<br />
=== Hostname resolution ===<br />
Avahi also allows you to access computers using their hostnames. '''Note:''' you must install <tt>nss-mdns</tt> for this to work.<br />
<br />
Suppose you have machines with names maple, fig and oak, all running avahi. Avahi can be set up so that you don't have to manage a <tt>/etc/hosts</tt> file for each computer. Instead you can simply use <tt>maple.local</tt> to access whatever services <tt>maple</tt> has. However by default, .local querying is disabled in Arch Linux. To enable it edit the file <tt>/etc/nsswitch.conf</tt> and change the line:<br />
hosts: files dns<br />
to<br />
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4<br />
<br />
A small section of users in Ubuntu noticed a slowdown in DNS querying; it was attributed to this change. Whether it applies to Arch Linux too, is not known. (Reference: [https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940 Ubuntu Bug 94940]) -- I found this to be true for Arch; However, I just used the line:<br />
hosts: files mdns4_minimal dns mdns4<br />
and I get the correct behavior without slower DNS.<br />
<br />
{{Note|I had to remove '''mdns''' completely to prevent slowdowns. However, '''mdns_minimal''' alone appeared to be sufficient.}} <br />
<br />
Avahi also has quite a few nifty utilities which can help you discover which services are being used on a network. <br />
The <tt>avahi-discover</tt> (Avahi Zeroconf Browser) shows the various services on your network. You can also browse SSH and VNC Servers using <tt>bssh</tt> and <tt>bvnc</tt> respectively.<br />
<br />
There's a good list of software with Avahi support at their website: http://avahi.org/wiki/Avah4users<br />
<br />
===File Sharing===<br />
<br />
====NFS====<br />
If you have an [[NFS]] share set up, you can use Avahi to be able to automount them in zeroconf-enabled browsers (such as Konqueror on KDE and Finder on Mac OS X). Create a .service file in /etc/avahi/services with the following:<br />
<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>Zephyrus Shared Music</name><br />
<service><br />
<type>_nfs._tcp</type><br />
<port>2049</port><br />
<txt-record>path=/data/shared/Music</txt-record><br />
</service><br />
</service-group><br />
<br />
The port is correct if you have ''insecure'' as an option in your /etc/exports; otherwise, it needs to be changed (note that ''insecure'' is needed for OS X clients). The path is the path to your export, or a subdirectory of it. For some reason the automount functionality has been removed from Leopard, however [http://www.macosxhints.com/article.php?story=20071116042238744 a script is available]. This was based upon [http://ubuntuforums.org/showthread.php?p=4387032#post4387032 this post].<br />
<br />
====GShare====<br />
You can grab [[gshare]] from [community] and have shared files between the LAN, with no configuration, no hours in samba hacking, no nothing - it just works.<br />
<br />
====Vsftpd====<br />
Sourced from [http://ubuntuforums.org/showthread.php?t=218630 ubuntuforums.org].<br />
If you would rather use a regular ftp service, install vsftpd and avahi. Change the settings of vsftpd according to what is shown on the ubuntuforums page or according to your own personal preferences (See 'man vsftpd.conf).<br />
<br />
Create a ftp.service file in /etc/avahi/services and paste in that file<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>FTP file sharing</name><br />
<service><br />
<type>_ftp._tcp</type><br />
<port>21</port><br />
</service><br />
</service-group><br />
When you are done, (re)start avahi-daemon and vsftpd in your /etc/rc.d directory.<br />
/etc/rc.d/avahi-daemon restart<br />
/etc/rc.d/vsftpd restart<br />
<br />
You might need to add the following to your /etc/hosts.allow file, so that any person can attempt to log in to your ftp site. See 'man hosts.allow' for other settings that you might want.<br />
'vsftpd: ALL' <br />
<br />
After that you should be able to browse through the ftp server from another computer in your network. The steps shown in this section are created so that the ftp server is 'advertised' by avahi to the local Zeroconf network.<br />
<br />
Unless you are using GNOME or KDE, you might not be able to log in to the ftp server directly through your file manager, and so you will have to use a ftp client pointed to the IP address of the server or the hostname of the machine (as shown in [[Avahi#Hostname_resolution|this section]]).<br />
<br />
====Giver====<br />
[http://code.google.com/p/giver/ Giver] is a mono program that allows simple file-sharing between two desktops when both are running Giver. All you need to do is click and drag the file to the name or picture of the person you wish to send the file to.<br />
<br />
A package is on the [http://aur.archlinux.org/packages.php?ID=17139 AUR].<br />
<br />
Note that this depends on gnome-sharp, which has heavy GNOME dependencies.<br />
<br />
==Link-Local XMPP Chat==<br />
Link-Local XMPP clients need TCP port 5298 allowed for incoming connections. Check [[Simple_stateful_firewall_HOWTO#Opening_ports_to_incoming_connections|Simple stateful firewall: opening ports to incoming connections]] for more details if you use iptables.<br />
<br />
====Pidgin====<br />
[http://www.pidgin.im Pidgin] is an instant messaging client that supports quite a few commonly used IM protocols. In addition to these, it supports Bonjour.<br />
<br />
Just select 'Bonjour' as the protocol type when you add an account, and enter a username. The first and last name you enter in the 'Advanced' tab will be what the other person (whom you are chatting with) sees, and 'local alias' under 'User Options' in the 'Basic' tab will be what you see of your own name (you could try putting in something like I, me or myself).<br />
<br />
Once this is done, other Pidgin (iChat) users who are on the local network will see you and be able to chat with you. To implement file-sharing, you just send and receive files like you would do with a regular IM session.<br />
<br />
====Kopete====<br />
[http://kopete.kde.org/ Kopete] is the KDE equivalent of Pidgin. It supports the Bonjour/Link-local XMPP protocol. One need to create an account in Kopete, by simply entering the desired name.<br />
<br />
====Telepathy====<br />
[http://telepathy.freedesktop.org Telpathy] is a communication framework which supports different protocols using plugins. The [http://www.archlinux.org/packages/?sort=&q=telepathy-salut&maintainer=&last_update=&flagged=&limit=50 Telepathy Salut] plugin provides support for Bonjour/Link-Local XMPP protocol. Empathy is a GNOME front-end to Telepathy. Officially, KDE does not support Telepathy, but work is going on which will eventually replace Kopete. Development version of KDE Telepathy is available in [https://aur.archlinux.org/packages.php?O=0&K=telepathy&do_Search=Go AUR].<br />
<br />
== External Resources ==<br />
* [http://avahi.org/ Avahi] - Official project website<br />
* [http://en.wikipedia.org/wiki/Avahi_%28software%29 Wikipedia entry]<br />
* [http://www.apple.com/support/downloads/bonjourforwindows.html Bonjour for Windows] - Enable zeroconf on Windows</div>Dimitarhttps://wiki.archlinux.org/index.php?title=Avahi&diff=148475Avahi2011-07-06T19:40:49Z<p>Dimitar: /* Pidgin */ Added new section for chat clients; TCP port 5298 needs to be open; added Kopete and Telepathy as programs which support Bonjour</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[http://avahi.org/ Avahi] is a free Zeroconf (Zero Configuration Networking) implementation, including a system for multicast DNS/DNS-SD service discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. It is licensed under the GNU Lesser General Public License (LGPL). (Source: [[Wikipedia:Avahi (software)]])<br />
<br />
== Installation ==<br />
Install Avahi with:<br />
<pre><br />
# pacman -S avahi nss-mdns<br />
</pre><br />
After installing Avahi you will need to restart the ''dbus'' daemon before you can start ''avahi-daemon''.<br />
<br />
To start Avahi at boot, add ''avahi-daemon'' to the DAEMONS line of /etc/rc.conf. Note that ''avahi-daemon'' must be started after the ''dbus'' daemon.<br />
<br />
For some reason, I (ArcherSeven) have found that adding avahi-daemon to /etc/rc.conf loads it too early and it fails. To get around this, I added it as '/etc/rc.d/avahi-daemon start' to /etc/rc.local. Might be worth a try if you have issues. (This despite it being the last loaded daemon in rc.conf)<br />
<br />
== Using Avahi ==<br />
<br />
=== Hostname resolution ===<br />
Avahi also allows you to access computers using their hostnames. '''Note:''' you must install <tt>nss-mdns</tt> for this to work.<br />
<br />
Suppose you have machines with names maple, fig and oak, all running avahi. Avahi can be set up so that you don't have to manage a <tt>/etc/hosts</tt> file for each computer. Instead you can simply use <tt>maple.local</tt> to access whatever services <tt>maple</tt> has. However by default, .local querying is disabled in Arch Linux. To enable it edit the file <tt>/etc/nsswitch.conf</tt> and change the line:<br />
hosts: files dns<br />
to<br />
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4<br />
<br />
A small section of users in Ubuntu noticed a slowdown in DNS querying; it was attributed to this change. Whether it applies to Arch Linux too, is not known. (Reference: [https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940 Ubuntu Bug 94940]) -- I found this to be true for Arch; However, I just used the line:<br />
hosts: files mdns4_minimal dns mdns4<br />
and I get the correct behavior without slower DNS.<br />
<br />
{{Note|I had to remove '''mdns''' completely to prevent slowdowns. However, '''mdns_minimal''' alone appeared to be sufficient.}} <br />
<br />
Avahi also has quite a few nifty utilities which can help you discover which services are being used on a network. <br />
The <tt>avahi-discover</tt> (Avahi Zeroconf Browser) shows the various services on your network. You can also browse SSH and VNC Servers using <tt>bssh</tt> and <tt>bvnc</tt> respectively.<br />
<br />
There's a good list of software with Avahi support at their website: http://avahi.org/wiki/Avah4users<br />
<br />
===File Sharing===<br />
<br />
====NFS====<br />
If you have an [[NFS]] share set up, you can use Avahi to be able to automount them in zeroconf-enabled browsers (such as Konqueror on KDE and Finder on Mac OS X). Create a .service file in /etc/avahi/services with the following:<br />
<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>Zephyrus Shared Music</name><br />
<service><br />
<type>_nfs._tcp</type><br />
<port>2049</port><br />
<txt-record>path=/data/shared/Music</txt-record><br />
</service><br />
</service-group><br />
<br />
The port is correct if you have ''insecure'' as an option in your /etc/exports; otherwise, it needs to be changed (note that ''insecure'' is needed for OS X clients). The path is the path to your export, or a subdirectory of it. For some reason the automount functionality has been removed from Leopard, however [http://www.macosxhints.com/article.php?story=20071116042238744 a script is available]. This was based upon [http://ubuntuforums.org/showthread.php?p=4387032#post4387032 this post].<br />
<br />
====GShare====<br />
You can grab [[gshare]] from [community] and have shared files between the LAN, with no configuration, no hours in samba hacking, no nothing - it just works.<br />
<br />
====Vsftpd====<br />
Sourced from [http://ubuntuforums.org/showthread.php?t=218630 ubuntuforums.org].<br />
If you would rather use a regular ftp service, install vsftpd and avahi. Change the settings of vsftpd according to what is shown on the ubuntuforums page or according to your own personal preferences (See 'man vsftpd.conf).<br />
<br />
Create a ftp.service file in /etc/avahi/services and paste in that file<br />
<?xml version="1.0" standalone='no'?><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name>FTP file sharing</name><br />
<service><br />
<type>_ftp._tcp</type><br />
<port>21</port><br />
</service><br />
</service-group><br />
When you are done, (re)start avahi-daemon and vsftpd in your /etc/rc.d directory.<br />
/etc/rc.d/avahi-daemon restart<br />
/etc/rc.d/vsftpd restart<br />
<br />
You might need to add the following to your /etc/hosts.allow file, so that any person can attempt to log in to your ftp site. See 'man hosts.allow' for other settings that you might want.<br />
'vsftpd: ALL' <br />
<br />
After that you should be able to browse through the ftp server from another computer in your network. The steps shown in this section are created so that the ftp server is 'advertised' by avahi to the local Zeroconf network.<br />
<br />
Unless you are using GNOME or KDE, you might not be able to log in to the ftp server directly through your file manager, and so you will have to use a ftp client pointed to the IP address of the server or the hostname of the machine (as shown in [[Avahi#Hostname_resolution|this section]]).<br />
<br />
====Giver====<br />
[http://code.google.com/p/giver/ Giver] is a mono program that allows simple file-sharing between two desktops when both are running Giver. All you need to do is click and drag the file to the name or picture of the person you wish to send the file to.<br />
<br />
A package is on the [http://aur.archlinux.org/packages.php?ID=17139 AUR].<br />
<br />
Note that this depends on gnome-sharp, which has heavy GNOME dependencies.<br />
<br />
==Link-Local XMPP Chat==<br />
Link-Local XMPP clients need TCP port 5298 allowed for incoming connections. Check the [Simple_stateful_firewall_HOWTO#Opening_ports_to_incoming_connections Simple stateful firewall: opening ports to incoming connections] for more details if you use iptables.<br />
<br />
====Pidgin====<br />
[http://www.pidgin.im Pidgin] is an instant messaging client that supports quite a few commonly used IM protocols. In addition to these, it supports Bonjour.<br />
<br />
Just select 'Bonjour' as the protocol type when you add an account, and enter a username. The first and last name you enter in the 'Advanced' tab will be what the other person (whom you are chatting with) sees, and 'local alias' under 'User Options' in the 'Basic' tab will be what you see of your own name (you could try putting in something like I, me or myself).<br />
<br />
Once this is done, other Pidgin (iChat) users who are on the local network will see you and be able to chat with you. To implement file-sharing, you just send and receive files like you would do with a regular IM session.<br />
<br />
====Kopete====<br />
[http://kopete.kde.org/ Kopete] is the KDE equivalent of Pidgin. It supports the Bonjour/Link-local XMPP protocol. One need to create an account in Kopete, by simply entering the desired name.<br />
<br />
====Telepathy====<br />
[http://telepathy.freedesktop.org Telpathy] is a communication framework which supports different protocols using plugins. The [http://www.archlinux.org/packages/?sort=&q=telepathy-salut&maintainer=&last_update=&flagged=&limit=50 Telepathy Salut] plugin provides support for Bonjour/Link-Local XMPP protocol. Empathy is a GNOME front-end to Telepathy. Officially, KDE does not support Telepathy, but work is going on which will eventually replace Kopete. Development version of KDE Telepathy is available in [https://aur.archlinux.org/packages.php?O=0&K=telepathy&do_Search=Go AUR].<br />
<br />
== External Resources ==<br />
* [http://avahi.org/ Avahi] - Official project website<br />
* [http://en.wikipedia.org/wiki/Avahi_%28software%29 Wikipedia entry]<br />
* [http://www.apple.com/support/downloads/bonjourforwindows.html Bonjour for Windows] - Enable zeroconf on Windows</div>Dimitar