Operating System - HP-UX
1752701 Members
5942 Online
108789 Solutions
New Discussion юеВ

Changing lp spooler defaults

 
SOLVED
Go to solution
Daniel Gowans
Advisor

Changing lp spooler defaults

I have never done printing on HP-UX before, and am trying to get it working to my liking. I have an HP Jetdirect box. I installed the HP jetdirect software, and it added the printer to my print queue. The printer is an HP Laserjet 4. It is hooked to port 1 of the jetdirect. It uses the 'net_ljx000' driver.

Printing works fine, I just want to know how to set defaults. First, it always prints landscape. How do I get portrait to be the default? Secondly, it always prints this initial banner page with the username in giant letters, the request, options, date, option summary, etc. I really don't want to print this page- just the document. How do I turn that off too?

Thanks for any help!
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: Changing lp spooler defaults

cd /var/spool/lp/interface/model.orig

First make a copy of your current interface.
e.g. cp myprinter myprinter.saf
vi myprinter

You will probably see a line
banner=$DEF
change it to
banner=""

also
orientation="def"
change it to
orientation="p"

Save the file and you should be done.

If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: Changing lp spooler defaults

Daniel,

You need to look into options for the lp command. For portrait mode, use "lp -oport". For no banner, use "lp -onob".

For a list of options, print a file with lp -ooptions.


Pete


Pete
Rita C Workman
Honored Contributor

Re: Changing lp spooler defaults

You loaded the jetdirect software and " IT " added the printer to your print queue.
Are you talking Windows....or HPUX??

Did you on your HPUX server either run jetadmin or use SAM to add/create the printer & print queue??

If you want to 'modify' some of the default settings for a printer, you could go in to the /etc/lp/interface/ file and do some 'tweeking'. But, since your a novice on this, I wouldn't recommend that.

Controlling some things are printing are done using the printer options for that particular printer. Example: don't want a banner page then
lp -d -onb
the -o is option and nb is for no banner page


Hope this helps get you started
Rita C Workman
Honored Contributor

Re: Changing lp spooler defaults

You loaded the jetdirect software and " IT " added the printer to your print queue.
Are you talking Windows....or HPUX??

Did you on your HPUX server either run jetadmin or use SAM to add/create the printer & print queue??

If you want to 'modify' some of the default settings for a printer, you could go in to the /etc/lp/interface/ file and do some 'tweeking'. But, since your a novice on this, I wouldn't recommend that.

Controlling some things are printing are done using the printer options for that particular printer. Example: don't want a banner page then
lp -d -onb
the -o is option and nb is for no banner page


Hope this helps get you started,
Rit
Daniel Gowans
Advisor

Re: Changing lp spooler defaults


This location doesn't exists on this machine:

/var/spool/lp/interface/model.orig

Any alternative locations? It may have to do with Jetdirect setting it up.

To add the printer, I installed this using swinstall:

J4189-11001C E.10.34 HP JetDirect Printer Installer for UNIX

I then went into SAM -> Printers and Plotters -> LP Spoolers -> Printers and Plotters -> Actions -> Add Network Based Printer/Plotter -> Add HP JetDirect Printer/Plotter

Then sam ran this command:
/opt/hpnpl/admin/hppi

Inside this Installer, I selected option 1) Spooler Administration -> 1) Add printer to local spooler, gave it the JetDirect IP address and port (1), gave the printer the name "laser", made it default, configured (0) exited, and it showed up in the list.

I am begining to think I should define an alias for lp using the defaults I desire, but it would be nice to just change them permanently so that lp will not produce a banner and use portrait.

It seems I have figured out much of HP-UX, but printers is confusing for me. Thanks for your help.

Pete Randall
Outstanding Contributor
Solution

Re: Changing lp spooler defaults

Daniel,

Rather than mess with the model script, I do exactly as you surmised. I put an alias in my personal start-up (.kshrc) in my case. I expect you could probably put this into /etc/profile and ensure that it's parsed by everyone at login.


Pete


Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Changing lp spooler defaults

If you used hppi to install the printer, it should have created the file "laser" in both the /var/spool/lp/interface and /var/spool/lp/interface/model.orig directories. The lp command first invokes the laser file in the interface directory which in turn invokes the one in model.orig. Setting this stuff up as an alias is a Mickey Mouse solution because you will need to do it for each user. I also would prefer that you don't directly enter the IP address when you add the printer but instead use a hostname. If you ever have to change the printer's IP address, the change simply means an /etc/hosts (or DNS change).

You will probably be better off to remnove the printer and start over directly using hppi.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Changing lp spooler defaults

Clarification:

The default in *ALL* printer model scripts is to use the printer's settings, that is, the script adds nothing to the job stream except a default reset (ESC E). That means that the reason you see landscape is some well-meaning (but misinformed) user has messed with the front panel settings on the printer. Now Windows printer drivers generally don't assume anything about the printer so even with bad options in the printer, they are explicitly defined in the driver's data stream. Verify the printer's settings by printing a test page and you''ll probably see the bogus setting. You can get the printer back to 'cold reset' state by turning off the printer, then back on again while holding the ONLINE key down...note that this varies a lot with the model of the printer so check your owber's manual. AND BEFORE you issue a cold reset (which resets the JetDirect card) make sure that the JetDirect card gets it's settings automatically from a DHCP or bootp server. Otherwise, you may have to setup the JetDriect card again.

As far as the banner page, as mentioned, you can turn this off in the printer script. However, the directory: /var/spool/lp/interface/model.orig must exist since this is where all the printer scripts for active printers actually live. Is there a /var/spool/lp directory?

As far as HP-UX and printers, the JetDirect software has little to do with Unix so there isn't much you can draw upon your previous knowledge to make sense out of all this. JetDirect is a special connection as the printer is treated as if it is local. To do this, the standard interface scripts contain a reference to the model.orig directory where the specific printer scripts are kept and when printing, the generic interface script calls hpnpf to do the actual printing. Note that network printing (SAM's terminology) means HP JetDirect cards while remote printer (SAM again) means a remote computer such as Linux or Windows.


Bill Hassell, sysadmin