Setting up a network printer as local device in RHEL
Issue
-
Instead of setting a network JetDirect print queue I would like to setup a device, like
/dev/printer1
for example, that is linked to the IP address of the printer. I remember setting this up using thehpnptyd
command in SCO Unix. -
We would like to make a network printer appear as a local printer. It can then be treated as any other printer; for example, any available model scripts and filters can be used. This is done using the
hpnptyd
utility in SCO Unix using the following procedure:-
Configure a pseudo-terminal to the networked printer, as follows:
/usr/lib/hpnp/hpnptyd -m /dev/ptypN -x host
where
N
is the pseudo-tty number andhost
is the host name of the network printer. This command starts a daemon which redirects data sent to the pseudo-tty to the network printer.-
Once the pseudo-tty has been set up, you can use
lpadmin
to add the printer to the system. For example, to add an HP LaserJet 5N (PCL) withlpadmin
:lpadmin -p mhlaser -T hplaser -I pcl -m standard -v /dev/ttyp18
Print requests sent to mhlaser are sent across the network to your laser printer.
-
-
Today we are using an application that runs under SCO OpenServer 6.0. We have Okidata connected to Digiboard using a serial connection (for example,
/dev/ttya01
). The application is set up to print directly to/dev/ttya01
. I am setting up RHEL without any Digiboard. I will be converting the serial Okidata printer to a network connection. A print server (192.168.2.1
) will be connected to the parallel port of the Okidata. In RHEL, I can add a new printer using a DeviceURI likesocket://192.168.1.2
, and it will print fine from RHEL. However, The application is written to print to a serial printer's device and not to a spool printer queue. Is there a way to link the IP address (192.168.1.2
) to a device in/dev
, for example/dev/okidata
. Where that device would print to the Okidata's network printer when sending data to the/dev/okidata
?
Environment
- Red Hat Enterprise Linux (RHEL)
- Common Unix Printing System (CUPS)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.