Operating System - HP-UX
1846739 Members
3588 Online
110256 Solutions
New Discussion

building a remote printer

 
SOLVED
Go to solution
khilari
Regular Advisor

building a remote printer

hi guys, i want to build a remote printer, how do i do it on command line. Printer name would be printer1 and the remote system is remote1. what do i type in mrmodel or other options.And do i have to stop the shedular before issuing the lpadmin command.
Thanks
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: building a remote printer

HI:

There is an example in the manpages for 'lpadmin(1M)'. You must stop the scheduler before issuing the command string. For example:

# lpshut
# lpadmin -pmylp -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -ormn
-dnsname -orplpt1_text -v/dev/null
# accept mylp
# enable mylp

...where, "mylp" is the name of the printer queue on the local host; "n-dnsname" is the hostname where the remote print queue resides; and "lpt1_text" is the remote printer queue.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: building a remote printer

The lpadmin man page has a good example. There is only one rmodel script so the choice is easy. Here is an example:

lpadmin -plp3 -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -ormsystem2 -orpmyprint -v/dev/null

The local printer is lp3, the remote system is system2 (could also be an IP addr), and most important: the remote printer's name is myprint. A print server may have multiple printers attached so the name of the printer in the remote server is required, even if there is only 1 printer attached.

Now I mention this requirement because your print server may actually be a network card in the printer. So the internal name of the printer must be determined from the card's documentation.


Bill Hassell, sysadmin
khilari
Regular Advisor

Re: building a remote printer

i am using the command
/usr/sbin/lpadmin -poptiods -v/dev/null
-ormnewoptio â mrmodel -orpoptiods are these options enough?

Another thing when i do a lpstat -t i get

root# lpstat -t | grep optiods
device for optiods: /dev/null
optiods accepting requests since Jan 11 16:27
printer optiods is idle. enabled since Jan 11 16:28

root# lpstat -t | grep PABillState
device for PABillState: /dev/null
remote to: PABillState on newoptio
PABillState accepting requests since Jul 25 15:19
printer PABillState is idle. enabled since Jul 25 15:19
Now, for optiods i dont see any
remote to: PABillState on newoptio

Any reasons, y?

Thanks
Bill Hassell
Honored Contributor
Solution

Re: building a remote printer

Your command:

> i am using the command
/usr/sbin/lpadmin -poptiods -v/dev/null
-ormnewoptio -Â Â mrmodel -orpoptiods

is incomplete. You need to specify 8 options for a remote printer. I don't understand the reference to PaBillState. Here are the static parameters:

-mrmodel
-ocmrcmodel
-osmrsmodel
-ob3
-d/dev/null

Then you must supply the 3 variable options:

-pLOCALQUEUE
-ormPRINTSERVER
-orpREMOTERPRINTER

where LOCALQUEUE is the name for your printer in the local system. PRINTSERVER is the hostname or IP for the printer server, and REMOTEPRINTER is the name of the printer you want to use on the PRINTSERVER.

lpstat -t is a very complicated command to use to find your printer. Query your printer with:

lpstat -aLOCALQUEUE -oLOCALQUEUE -PLOCALQUEUE

However, it is a lot easier to run sam and add the remote printer.


Bill Hassell, sysadmin