Administration Guide : Command-line manual pages

HOTFD(8) manual page

Name

hotfd - hot folder daemon

Synopsis

/usr/etc/appletalk/hotfd [ -D | -d dblev ] [ -c configfile ]

Description

The hotfd program monitors any hot folders configured on the system. When files appear in the folders, it submits them via the local printing system to the appropriate printer. One daemon monitors all of the folders on a single machine. Hot folders are controled by a configuration file, and are usually created with the Xinet GUI. Hotfd runs as a daemon in the background unless one of the debug options is given.

The configuration file consists of a series of text lines specifying the directory to watch, the printer to pass the files to, and some options. The format of each line is:

dirpath :printqueue :options

where dirpath is the full local pathname to the directory, printqueue is the name of the printer queue to which files will be submitted, and options is a colon-separated set of key/value pairs (a la printcap(5) ). Supported keys are as follows:

KeyTypeWhat it controls
asbooleanif OPI-replacment happens, use ASCII picture format
dcbooleanpassed to opi (8) to turn on removal of OPI
    comments when images are successfully replaced
dhbooleando not make files invisible before processing
dtintegernumber of seconds to wait for files to stop being
    modified before submitting them to the print queue
exstringcommand to use to process the files (see below)
ixstringcommand to use to process standard input (see below)
jpintegersend pictures JPEG compressed. The value is a quality
    factor (1->99). Setting this overrides the as key.
ktbooleanretain PC-style TIFF preview if EPS file has one
rpstring0 means don't replace, full (the default) means
    replace at original resolution, else this is the
    (floating point) DPI at which to replace pictures
upbooleanenable image up-sampling to the replacement DPI

If there are no hot folders configured, hotfd will exit. The GUI will start it if it creates any hot folders. Hotfd only reads its configuration file at startup and when it recieves a HUP signal.

Custom Processing

If you do not want to pass the files from the hot folder to the default printing system, you may specify (one or) two custom processing commands instead. Hotfd normally passes EPS and PostScript files through a pipe to Standard Input, and handles all other files by giving the processing command the full pathname to the file. So you would normally include both an ex and ix command string so that all files can be processed correctly. When using these commands, the printqueue field is ignored, but must contain at least one character. Keep in mind that OPI-replacement is not performed by the hotfd program. It simply primes PostScript files with the selected replacement options.

If an ex command is provided, but the ix counterpart is not, then all files will be processed by the ex command without passing the data via Standard Input. This effectively disables the insertion of OPI-replacement parameters into the file.

These command strings are parsed somewhat like shell commands. Specifically, the quoting characters ", ' and \ are interpreted as they would be by the command shell. After parsing, the string ``$f$'' is replaced by the full pathname to the file being processed (and ``$F$'' is replaced by the last component of the filename). Other than Standard Input being used to pass the input file to the "ix" command, no I/O redirection or standard I/O channels may be used. The special sequence "CoLOn" can be used to include ":" in arguments.

An example: if you wanted to use the LPR printing system on IRIX instead of the default LP, you could create an entry like the following (note that all this text must be on one line in the hotfolderconf file, and the line length is limited to 2048 bytes):

/bigdisk/submission:*:rp=150:ex=lpr -Pmyprinter $f$: ix=lpr -P myprinter -J "bigdisk $F$":dt#20

This entry would cause /bigdisk/submission to be watched and, if a file there has been untouched for at least 20 seconds, it would be handed to the LPR queue myprinter with OPI-replacement set to 150 DPI. EPS/PostScript jobs would have their Job Name set to ``bigdisk filename''.

Files

/var/adm/appletalk/hotfolderconf
Unless overridden by the -c option, this file contains the configuration of the hot folders.
/var/adm/appletalk/hotfd_pid
Place where hotfd writes its PID, so it can be HUPped.