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 ( 56 data bytes
64 bytes from icmp_seq=0 ttl=128 time=0.183 ms
64 bytes from icmp_seq=1 ttl=128 time=0.266 ms
64 bytes from icmp_seq=2 ttl=128 time=0.275 ms
64 bytes from icmp_seq=3 ttl=128 time=0.374 ms
64 bytes from icmp_seq=4 ttl=128 time=0.281 ms
64 bytes from icmp_seq=5 ttl=128 time=0.302 ms
64 bytes from icmp_seq=6 ttl=128 time=0.465 ms
64 bytes from 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


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


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.

Printing Legal-Sized on a Canon MX922

Currently my printer is a “Canon MX922″, and perhaps it would be a good subject for a later posting, how I installed the CUPS device drivers to use it under Linux. Being a WiFi-printer, it is also shared by my two Windows machines.

In keeping with modern times, my bank only sends me certain forms in electronic form, that used to be mailed to us in their entirety, on paper. And some of the forms, which I need to submit along with my Tax Declarations each year, are in Legal-Sized format, which in Canada and the USA means 8.5 x 14 inch paper, instead of a 8.5 x 11 inch format.

I had never realized that this printer is capable of receiving paper in the 8.5 x 14 format, until today. Basically, my Linux and Windows software have two different behaviors, when told to print an 8.5 x 14 PDF on 8.5 x 11 paper, but both of those behaviors is wrong. Under Linux, “Okular” tends to resize the document to fit, while the Windows software tends to write past the end of the sheet. A resized document will not get scanned correctly by the Revenue Agency’s machines.

On the MX922 printer, there are two paper trays. The upper tray is for smaller formats of paper, as well as having interesting features that seem to allow printing directly onto Blu-Ray discs.

The lower tray accepts the 8.5 x 11 sheets. But if we take out the supply of 8.5 x 11 (Letter-sized) sheets, we see that underneath there is a slight feature in the plastic of the tray, which seems to lock into one of two openings. Between the two openings there is labeling stamped into the plastic, which has the letters “LGL” and which seems to point between the two openings.

What one needs to do, is to depress the button which seems to fit, with our thumb, not to pull on that part of the tray, but to pull on the outermost edge of the tray, so that the button we’re holding down slips out from under the visible surface of the tray, and then slides into the second opening, which is located in the tray facing down, further away from the body of the printer, next to the first opening. Once the button clicks into this second opening, the tray is able to accept 8.5 x 14 sheets.

One needs to be careful though, not to apply brute force if something doesn’t move, because this mechanism looks fragile, and could easily be damaged if force was used.

Also, one needs to remember that after we have extended the tray and fed in Legal-sized paper, we still need to slide the tray back into the printer, so that the printer will register the fact that paper is available. At which point in time extra length of tray will be standing out from the printer, where the tray was flush when accepting 8.5 x 11 paper.

Next, our software needs to be told that it is printing to 8.5 x 14 sheets, so that this software does not decide to resize, or otherwise to mismanage the print job.

Once the correct paper-size is set up on the printer, my Linux “Okular” program is as able to print the tax documents, as the Windows “Acrobat Reader DC” is.