1819980 Members
3837 Online
109607 Solutions
New Discussion юеВ

sam & printers

 
Jeff Hagstrom
Regular Advisor

sam & printers

I created a remote printer from sam. In the setup screen "Remote System Name: " I enter the IP address. Where does this get written out to? Some IP addresses get written to the printer file in /usr/spool/lp/interface. However, when you add a remote printer/plotter, it must get written out somewhere else.
I need to change the IP address to some printers that were setup this way and I don't want to have to delete and add.
8 REPLIES 8
John Poff
Honored Contributor

Re: sam & printers

Hi,

Check the interface file for the printer in /var/spool/lp/interface. It should be in there.

JP
Jeff Hagstrom
Regular Advisor

Re: sam & printers

NOPE!
Normally they are kept in the host file with a link by a printer name to that directory.
John Poff
Honored Contributor

Re: sam & printers

Did you see a line in the interface script that starts with:

PERIPH=

If that line has a hostname instead of an IP address, you might be fine. The script I'm looking at for my local HP LaserJet has an IP address, but that's just because our network wizards don't have it in DNS here and we have to specify the IP address.

JP
Jeff Hagstrom
Regular Advisor

Re: sam & printers

You don't get that kind of entry in the printer file when you create a remote printer/plotter. The HP tech said to remove and re-add, but there has to be file out there that holds the IP address.
Jeff Schussele
Honored Contributor

Re: sam & printers

Hi Jeff,

I've got good news & bad news for you......

First the good news - I know where this is stored. It's in /var/spool/lp/pstatus

Now the bad news - that's a binary file. Try to cat it or more it & you'll see. To verify the file do

strings /var/spool/lp/pstatus | grep "xxx.xxx.xxx.xxx"

use your IP, of course.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Poff
Honored Contributor

Re: sam & printers

Oops. Sorry about that. I had a brain fart. I was thinking of a network attached printer.

JP
Dario_1
Trusted Contributor

Re: sam & printers

Here is the area that has the line on in the /var/spool/lp/interface/printername file:

# xPORT, PERIPH, TEOJ are all configurable
xPORT=
PERIPH=555.444.2.555
# [ Follwing variable is added by suresha to fix the correct display of
# model script name in modifing queue on 10th March 2000
MODELSCRIPTNAME=net_ljx000
# End of change by suresha ]
DEVTYPE="PJL

Hope this helps.

DR
S.K. Chan
Honored Contributor

Re: sam & printers

Jeff is right, this gets written to /var/spool/lp/pstatus. You can use command line (run it through a for loop if you got multiple printer to deal with) to delete and then re-add it.
# lpshut
# lpadmin -x
# lpsched
That deletes it.
# lpshut
# lpadmin -p -mrmodel -v/dev/null -ocmrcmodel -osmrsmodel -orm -orp
# enable
# accept
# lpsched
That adds a remote printer.