Discovering avahi

One of the facts about modern computing which many people take for granted, is a LAN which can be browsed. Without such an ability, a Local Area Network only consists of IP addresses, and unless we have made special preparations otherwise, those IP addresses can also be reassigned by our router. Yet, this view of the LAN has prevailed under Linux for some time, where specific services need to be configured with text-files, and where users have made entries in the file ‘‘, such that specific host-names are associated with specific IP addresses, that are defined manually.

There exists a Linux solution to this problem, which can be installed with the package ‘‘. In short, this daemon provides in a Linux-friendly way, what the old ‘‘ used to provide under Windows. It associated packages, ‘‘, ‘‘, and ‘‘ , provide a GUI that allows the local computer to browse graphically. Additionally, the package ‘‘ allows for the host-names on the LAN to receive the suffix ‘‘, so that regular Linux programs can refer to those host-names and connect to their IP addresses transparently, without requiring manual configuration.

 


dirk@Phoenix:~$ ping Mithral.local
PING Mithral.local (192.168.2.10): 56 data bytes
64 bytes from 192.168.2.10: icmp_seq=0 ttl=128 time=0.183 ms
64 bytes from 192.168.2.10: icmp_seq=1 ttl=128 time=0.266 ms
64 bytes from 192.168.2.10: icmp_seq=2 ttl=128 time=0.275 ms
64 bytes from 192.168.2.10: icmp_seq=3 ttl=128 time=0.374 ms
64 bytes from 192.168.2.10: icmp_seq=4 ttl=128 time=0.281 ms
64 bytes from 192.168.2.10: icmp_seq=5 ttl=128 time=0.302 ms
64 bytes from 192.168.2.10: icmp_seq=6 ttl=128 time=0.465 ms
64 bytes from 192.168.2.10: icmp_seq=7 ttl=128 time=0.280 ms
^C--- Mithral.local ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.183/0.303/0.465/0.078 ms
dirk@Phoenix:~$


 

Some people have noted problems getting this latter feature to work, but on my LAN, it just seems to work out-of-the-box.

avahi_1

It should be noted though, that if we install this to a computer which is not used to it, there can be some stability issues, and ‘‘ may not be compatible with arrangements some users have already made, to resolve their host-names. There was a specific problem I ran in to myself, after installing this on a laptop, according to which a list of available printers had become unstable, as viewed from one application.

Continue reading Discovering avahi

Mozilla Printers List continuously Reloads, and alternately shows a Network Printer as Existing and Not.

I recently ran into an error condition, in which on my Linux laptop ‘Klystron’, I had pulled up a Printers List within Firefox, to Print out a Web-page. And the list of available printers kept updating, alternately with a network printer displayed as existing, and with the same printer missing, just over once per second.

I was able to get to the root of this problem.

I had recently installed the package ‘‘ on that laptop, prior to which that error condition did not occur. ‘‘ is a service-discovery daemon, which means that it scans the network neighborhood, and makes shared resources visible in the lists of GUI applications, where those resources might normally not be visible under Linux.

The cause of this problem seems to be, that if more than one resource exists by the same name, Firefox will continuously be in a state of confusion, about the fact that both resources should exist side-by-side.

For example, it is possible to have a printer named ‘‘, which is a WiFi-printer and which is therefore accessible directly on the LAN, by way of the router. It could be installed directly on all the computers by way of . But at the same time it is possible to have a server set up which is named ‘Phoenix’, the of which has that printer installed directly, as well as having the ‘‘ installed, which offers to share all the local printers as a share by the same name, by default.

Next, if we have a laptop named ‘Klystron’, which is running the ‘‘, then according to its new discovery capabilities, there are at least two printers on the same network,

  • ‘ As installed on the LAN’ and
  • ‘ As belonging to the Samba server Phoenix’

As far as I can tell, the problem here is that both printers will have the same name, because the serves it out as having the same name it had locally with its own . And at that point, the Available Printers List belonging to Firefox becomes unstable.

There is more than one way to solve this problem.

Continue reading Mozilla Printers List continuously Reloads, and alternately shows a Network Printer as Existing and Not.