Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: October 8, 2008 (debian - 07/07/09)

Section: 8 (Commandes administrateur)


hpoj reference: "ptal-printd"


ptal-printd devname [options...]


The "ptal-printd" daemon creates a special file (specifically, a named pipe), which simulates a traditional unidirectional printer character device. Any data written to this pipe special file, presumably by the print spooler, is correctly routed through "libptal", "ptal-mlcd", and on to the printer. Using "ptal-printd" makes it easy to set up a print queue in conjunction with the hpoj software, because given a particular print spooler, almost exactly the same procedure is used to set up printing with an hpoj-driven multi-function peripheral as would be used to set up printing with a single-function printer. The only difference is where the print job data goes; instead of printing to something like "/dev/lp0" or "/dev/usb/lp0", the print queue is configured to print to something like "/var/run/ptal-printd/mlc_par_OfficeJet_Series_700" or "/var/run/ptal-printd/mlc_usb_OfficeJet_G85". Important: If you're using CUPS (Common UNIX Printing System) as your print spooler, then "ptal-printd" likely will not work for you, because for security reasons newer versions of CUPS refuse to print to arbitrary file locations. The hpoj software now includes a CUPS "ptal" backend ("ptal-cups") which you should use instead of "ptal-printd". Click here for more information on setting up printing with the hpoj software. Syntax The "ptal-printd" command-line syntax is as follows:


"devname" is the PTAL device name (required)

Recommended options:

"-like /dev/lp0" --- Copies the pipe's permissions (mode, owner, and group) from the "/dev/lp0" device node. It's probably OK to specify "/dev/lp0" regardless of how your device is connected, as long as the specified device node is actually present on your system. However, this is not necessarily the case anymore with the advent of "devfs" on some distributions, so "ptal-init" now caches these permissions in a separate file ("/etc/ptal/ptal-printd-like") and passes it to ""ptal-printd -like"".
"-morepipes n" --- Creates n additional pipes (for example, 9) for this device, in case you want to set up multiple print queues.

Other possible options (not necessary in most cases):

"-pipename filename" --- Sets name of pipe. The default is based on the PTAL device name, with colon characters mapped to underscores.
"-pipepath path" --- Sets path of pipe if name doesn't contain a path (i.e. no slashes). The default path is "/var/run/ptal-printd".
"-colon character" --- Sets character to replace colon when using default pipename, since colons have a special meaning in "/etc/printcap". The default is the underscore character.
"-mode 0octal" --- Sets pipe permissions (use leading 0 for octal). The default is 0622 (user read/write, group/other write-only). Since it is set explicitly in the code, the "umask" setting doesn't affect it.
"-owner uid" --- Sets pipe owner (numeric user ID only). The default is the current effective UID.
"-group gid" --- Sets pipe group (numeric group ID only). The default is the current effective GID.
"-nofork" --- Runs in the foreground instead of the default as a background daemon.
"-retrydelay seconds" --- Sets retry delay if PTAL print-channel open fails. The default is 30 seconds.
"-timeout seconds" --- Sets idle timeout, where the PTAL print channel is closed if no data or end-of-file is received. The default is no timeout.
"-uel", "-nouel" --- Enables/disables wrapping jobs with UEL/end-of-job escape sequences. The default is disabled.


Previous versions of "ptal-printd" used "/dev/ptal-printd" as the default "-pipepath". That has now been changed to "/var/run/ptal-printd", because some platforms have a read-only "/dev" file system. For the sake of backwards compatibility, "ptal-init" attempts to create a symlink from "/dev/ptal-printd" to "/var/run/ptal-printd" so you don't have to recreate your print queues when upgrading from a previous hpoj version. If you're setting up multiple print queues to the same device, then you should ensure that the ""-morepipes n"" option is passed to "ptal-printd". This option causes the specified number of additional pipes (for example, 9) to be created with the same base name as the ``main'' pipe but with two underscores (or the character specified by "-colon") and a 1-based index appended, for example, "/var/run/ptal-printd/mlc_usb_PSC_750", "/var/run/ptal-printd/mlc_usb_PSC_750__1", "/var/run/ptal-printd/mlc_usb_PSC_750__2", etc. Simply set each print queue to send its data to a different one of these pipes to ensure that print data from multiple queues doesn't get interleaved (with quite undesirable results). Don't confuse the "ptal-printd" daemon (with a trailing ""d"") and the "ptal-print" command-line utility (without a trailing ""d""), which is an alias for "ptal-connect". "ptal-printd" logs startup and error messages to syslog ("/var/log/messages") in addition to logging to standard error. If you specify the "-uel" switch, a UEL (Universal Escape Language) sequence ("Esc%-12345X") is sent before a print job, and a PCL end-of-job sequence ("EscE") and another UEL are sent after a print job, to help identify job boundaries for the printer. However, this may not happen in the case of back-to-back print jobs, because "ptal-printd" may not get an end-of-file indication when reading from the pipe if data from the next job is already in the pipe by the time it reads the last data from the previous job. "-nouel" is now the default behavior, because normally print drivers automatically add these kinds of escape sequences if necessary, the printer already gets job boundaries based on when the print channel is closed and reopened between jobs, and it may cause problems when printing to devices that don't support PCL. If during a print job an error occurs with communicating with the device, the rest of the print job data is discarded, subject to the limitations discussed above regarding "ptal-printd"'s ability to detect boundaries of back-to-back jobs. Subsequent jobs are retried indefinitely if it's not possible to re-open the print channel to the device.
Viens chez moi, je te montrerai mon e2fsck ...
-+- LF in Guide du linuxien pervers - jusqu'où irez vous avec nous ? -+-