ITEM: BH8702L
Print queue to dynamic tty or pts login session
ENV:
AIX 4.1.4
Model R30
DESC:
Configuration is as follows:
Model_R30
| ethernet
|------------------------------------------------|
|
Cisco_AS5200_router
|||||||||||||||||||
48-dial up lines
PCs are going to by dialing into the Cisco router which will
then telnet to the R30 and the users will have a login. How
can I setup a print queue the the PCs?
The PCs are going to be running ProComm emulating vt220.
They won't be running TCP/IP - just a plain dialup session.
Each time they come into AIX they will have a different
/dev/pts/\# - how to print to a dynamic IP?
PASSTHROUGH PRINTING THROUGH A DYNAMIC TERMINAL TYPE CONNECTION
There are cases where a user will be connecting to the RISC system
via a dynamic device. This could be connecting to the RISC via a modem
pool on the RISC so that the user may have a different tty each time
he dials the system. It may also be a user that is using AADU
(AIX Access for Dos Users), and is connecting via a different pts
each time. These users at times wish to print something from the RISC
to a printer connected to their terminal/PC. If the terminal/PC supports
an escape sequence to enable/disable Passthrough Printing, then we can
create a solution that will do this.
The following solution is directed toward the AADU connection, but could
easily be modified to the above mentioned modem pool by replacing the
references to "pts" with "tty".
Basically, you can create a virtual printer with pts as the device.
Then put in the escape code to initialize the printer into passthru.
mode and the escape code to restore the printer at job end (hence you
do not need the script). Then what you may want to do is create a
symbolic-link file in the user's $HOME directory by changing the
file name in the stanza in /etc/qconfig for the pts-printer you have
just created. Then you can LINK the file to the user's port each
time the user is connected to the host via AADU. This would allow
the user to perform passthru printing through the port he is
currently connected to.
The steps are as followed:
A. Create a queue that prints to a file.
AIX 3.2
1) As root: touch /dev/dynamic_device1
2) enter 'smit printer' fastpath at the command line.
3) Select "Manage Local Printer Subsystem".
4) Select "Virtual Printers".
5) Select "Add a Virtual Printer".
6) Chose 1 for "Printer or Plotter Attached to Host".
7) Enter "dynamic_device1" for device name.
8) On the proceeding screen, chose the "ASCII printer" option.
(Please substitute your printer type here)
9) Next go through the printer options screen:
- Header? (n)
- Trailer? (n)
- Queue name? (enter the name for the queue here, we called
ours aadu)
- Default queue? (n)
10) When you are brought back to the Virtual Printer Screen, select
"Change/Show Characteristics of a Virtual Printer".
11) Choose the number for the virtual printer you have just added.
Then on the proceeding screen, enter the following:
ci=\\033.5i (This is printer on for IBM 3151 - see your ti file)
cr=\\033.4i (This is printer off string for IBM 3151)
The ci attribute initializes the printer for passthru. mode.
The cr attribute restores it at job end. If you wish to view
the entire list of attributes, enter '*' on this screen.
AIX 4.1
1) As root: touch /dev/dynamic_device1
2) smit rq
3) Add a Queue
4) select file File (in /dev directory)
5) select Other
6) select Generic
7) fill in dynamic_device1 for the filename
8) fill in the name of the queue in the ASCII field
9) once this completes press F3 twice to get back to the Print Spooling menu
10) select Programming Tools
11) select Change / Show Printer Attribute Database (Virtual Printers)
12) select your print queue
13) The following screen will prompt you for an attribute. enter:
ci=\\033.5i (Assuming 3151 emulation!)
cr=\\033.4i (Assuming 3151 emulation!)
The ci attribute initializes the printer for passthru. mode.
The cr attribute restores it at job end. If you wish to view
the entire list of attributes, enter '*' on this screen.
B. Perform a link to the port each time the user is connected.
1. Add the following lines to .profile in the user's $HOME directory
(from our example for the user "bill")
rm /dev/dynamic_device1
ln -s `tty` /dev/dynamic_device1
*NOTE: use backward quotes in the ln command line above
The first line will automatically removes any old link to the
old port from previous session. The second line establishes a
link to the new port for the current session. Thus these two
lines enable you to print through the current port as it changes
each time you are logged in. Note that root will have to 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 DOS machine, all
you need to do is create a separate queue for that user and follow the
steps outlined above. For example, to print to the aadu queue, we
entered the following command:
enq -Paadu filename
Please note that this method prints in passthrough mode only, meaning
that the local DOS machine will be temporary inactive while it prints.
Support Line: Print queue to dynamic tty or pts login session ITEM: BH8702L
Dated: April 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:21
Comments or suggestions?
Contact us