With the ThinLinc nearest printer feature, printer jobs are routed to a printer near the terminal the user is currently sitting at. This is accomplished by matching printers to hardware addresses of terminals.
The nearest printer is implemented as an extra printer queue, above the real printers. Printer jobs sent to the nearest queue will be sent to the nearest printer backend. The backend is a program which is called by CUPS together with all needed information. The nearest backend will look at the user name handled by CUPS and then ask the ThinLinc VSM server for more information about this user. The information tells the backend which terminal the user is currently using. It then queries the information stored in Hiveconf for a list of printers close to the terminal used by the printing user. When a printer is known the backend will reprint the job to this printer.
This queue is added to the VSM master server by tl-setup at installation of ThinLinc. The recommended setup is to configure one nearest printer queue in the CUPS daemon on the VSM Server host, and then let all agents use this CUPS daemon. See Section 5.2, “ Printer Configuration Overview ” for an overview of printer setup in a ThinLinc cluster.
To be able to work properly the nearest printer system needs information about physical layout. The information is divided into three sections, printers, locations and terminals. This information can be administrated by the tladm Webmin Module.
Each printer that should be handled by the nearest printer system should be entered with a name and an optional comment. The button can be used to fetch the current list of printers from CUPS. Please note that printers that are removed from CUPS must be manually removed from the list of printers in tladm.
Each location with terminals should be entered with a name, an optional comment and a list of local printers. A location can for example be a classroom, a department, a house, and so on. The possible printers are the ones entered in the printer interface.
For each terminal entered in this system you enter the terminal network interface hardware (MAC) address and the location the terminal resides in. The hardware address can be entered in many formats, but will be converted to all uppercase hexadecimal form separated by colon, i.e. "01:23:45:67:89:AB". You can explicitly add printers to the terminal settings, which then gets higher priority than the printers defined at the terminal's location. This can be handy if a terminal has a local printer connected to it, perhaps in a large room where the other printers are far away.
Normally you will first enter all printers, then all locations and finally all terminals in the system. To each location you can add a list of printers near that location. If the location is so big that different printers are close to different parts of the location, then you should probably divide the location into smaller parts. You can also assign close printers to a terminal. This can be used in cases where a terminal has a printer attached to itself or if the terminal, part of a bigger location, is placed in its own room together with a printer. You can read more about this administration in Chapter 16, Administration of ThinLinc With the tladm Webmin Module .
If a terminal has a printer directly assigned to it in the terminals module in tladm, that printer will be the nearest printer for that terminal. For printers without a printer directly assigned (the normal situation), the first printer in the list of printers for the terminal's location is selected when the user submits a printer job to the nearest queue.
If a user has more than one session, print jobs submitted via nearest printer will be redirected to the printer that is most near the client that made the last connection.
When printing via the nearest printer, the CUPS client can't get hold of all information about the real printer where the job will actually be printed, because it doesn't know that the printer job will be rerouted by the nearest driver. Therefore, the printing application has no way to know about the number of trays, the paper sizes available etc.). This is a problem for some applications, and it also adds to the number of applications that will be misconfigured, for example selecting the wrong paper size.
As a compromise, the nearest printer is configured with a PPD (Postscript Printer Definition) that covers a broad range of printer capabilities - it's a Generic Postscript Printer driver. This makes it possible to configures default values for some of the settings, for example paper size, using the CUPS configuration interface.
If all the printers in your organisation are of the same type, it may be a good idea to replace the Generic Postscript PPD installed for the nearest queue with a PPD for the specific printer in use. That will let CUPS-aware applications select between the specific set of features available for the specific printer model.