printer_client [-doc|RESOURCE_FILE] Get files queued for printing in a remote queue and print them on a local printer. The RESOURCE_FILE defines parameters of operation. The default is ~/printer_client.rc In normal mode the RESOURCE_FILE defines: printer The printer to use. local_queue The directory in which files to be printed are queued. After printing, their extension is changed to `.done'. This directory is made if it does not exist. remote_account The remote ssh account running the printer_server program. private_key The file name of the local file containing the private key for remote_account. The authorized_keys file of the remote_account must contain the line command="printer_server SERVER-QUEUE" ... where ... is the public key corresponding to the private_key. This line invokes the printer_server program that works with printer_client to move files to be printed from the remote SERVER-QUEUE directory to the local_queue directory and from there to the printer. The RESOURCE-FILE can also be set up to run printer_ client in test mode. See the end of this document. Printer_client reads and executes commands from its standard input. If no input is received within a set time (default 30 seconds), printer_client exe- cutes the `get' command which gets and prints any unprinted queue files, and then resumes waiting for another command (or another timeout). Files to be printed are put in the local_queue directory with extension .ps. When a file is printed, its exten- sion is changed from .ps to .done in both the local_ queue and server queue The common commands are: get Get any unprinted files and print them. cntrl-D Files in the server queue with extension .ps are copied to the local_queue direc- tory. Then they are printed and their extension is changed to .done in both the local_queue and server queue direc- tories. list List recent files. Ready (.ps) files and recently printed (recent .done) files in the server queue are listed. time [SECONDS] Reset the time interval between when printer_client is ready to read the next command and when it executes an automatic `get' command. The interval time is in seconds, with default of 30 seconds. The value 0 means infinity. If [SECONDS] is not given, the current time is printed. ? Print list of commands. help quit Exit exit cntrl-C Other occasionally useful commands are the follow- ing. In all these commands, FILE must have exten- sion .ps or .done, except for the `remove' command it may also have extension .out. listfiles List all the files in the server queue. File names have date and time and are in chronological order. File extensions indicate status: .out Still being written. .ps Ready to print. .done Printed. get FILE Copy FILE from server into local queue directory. print FILE Ditto but then print FILE and, if its extension is .ps, change its extension to .done in local queue and server queue directories after printing it. done FILE If FILE has the .ps extension, just change the extension to .done in the local queue and server queue director- ies. ready FILE If FILE has the .done extension, just change the extension to .ps in the local queue and server queue director- ies. sum FILE Check that the server and the local directory both have a copy of FILE and both copies have the same MD5 sum. remove FILE Remove the file from local directory and and server. debug [on|off] If the debug switch is on, a trace of communications between printer_client and the server is printed. With no option, the switch is toggled. The `on' and `off' options set the switch. Lines sent to the server are prefaced with `---> ', and lines received from the server are prefaced with `<--- '. See `printer_server -doc' for documen- tation describing the traced lines. listdir List server queue directory as per `ls -ltr'. localdir Ditto for printer_client local queue directory. ? Print command list. help doc Print this document. In test mode the RESOURCE_FILE does NOT define remote_account or private_key but instead defines: server The program to run as server. server_queue The server queue directory. This directory is made if it does not exist.