This document details the steps needed to enable passthrough printing via a dynamic terminal type connection.
At times, the user may connect to the RISC system through a couple of dynamic devices: he may connect to the RISC via a modem pool on the RISC so that he will have a different tty each time he dials the system, or he may connect through a telnet session and wants to print something from the RISC to a printer connected to his terminal or PC. If the terminal or PC supports an escape sequence to enable/disable passthrough printing, he can create a solution to enable it to do so.
NOTE: The solution provided in this document applies to the telnet connection, however, you could easily modify the modem pool connection mentioned above by simply replacing the references to "pts" with "tty".
The information in this document applies to AIX Versions 4.x.
The product documentation library is also available:
These steps would allow you to perform passthrough printing through the port you are currently connected to.
ci=\020\022 cr=\020\024The ci attribute initializes the printer for passthru. mode, and the cr attribute restores it at job end. To view the entire list of attributes, enter * on this screen.
NOTE: The preceding entry sets the ci and cr attribute to the codes for an IBM 3151 terminal. If you are using another terminal, modify the \020\022 and \020\024 to the codes for your terminal. \033 represents the escape character.
B. Perform a link to the port each time the user is connected.
ln -fs 'tty' /dev/dynamic_device1
NOTE: Use back-tics, NOT quotes, in the ln command line above. (A back-tic is in the top number-key row on a standard keyboard, on the key just left of the number 1 key, and just above the TAB key.)
The -f flag will automatically remove any old links to the old port from previous sessions, and then establish a link to the new port for the current session. This enables you to print through the current port as it changes each time you are logged in. Note that root will have created the /dev/dynamic_device1 with permissions that allow the users to remove and recreate this file.
For each user that wants to access the printer on the telnet machine, all you need to do is create a separate queue for that user and follow the preceding steps. For example, to print to the aadu queue, enter the following command:
enq -Paadu filename
NOTE: This method prints in passthrough mode only, which means that the local telnet machine will be temporarily inactive while it prints.
Sometimes the user will dial in or connect from different terminal types. The preceding method sets only a single set of codes and works only with a single terminal type.
As an alternative, you may define another set of attributes for the queue and set the ci and cr attribute to obtain the terminal passthrough codes from terminfo. To do this, modify the last five steps in the preceding method (after step 8).
This directory should have a filename similar to the following:
[queuename]:[queue_device]Run each echo statement as one command line:
echo :998:Wo::tput mc5 >> [queuename]:[queue_device] echo :999:Wf::tput mc4 >> [queuename]:[queue_device] chvirprt -q [queuename] -d [queue_device] ci=%\ Wo chvirprt -q [queuename] -d [queue_device] cr=%\ Wf
NOTE: The accent mark or back-quote before the Wo and Wf in the command lines above may or may not appear in your printed document.
This will cause the queue to obtain the passthrough strings from the terminfo database at the time of printing.
[ Doc Ref: 90605223514654 Publish Date: Spt. 29, 2000 4FAX Ref: 5932 ]