Default printer option conflicts?

Can anyone suggest where I could lok to resolve this conflict?

The command-line: lpotions -p printer -l

Reports the saved values with an “*” and (for evample: PageSize=Letter, InputSlot=MPT) seem to be in effect.

However, the desired page size has been set and subsequently reports in both the web-based CUPS and the YaST printer utilities, as A4?

Regards, Martin

Hi Martin,

There are a few things relating to lpoptions which you might not be aware of:

  1. lpoptions only sets system-wide defaults when run as root. Otherwise it affects the invoking user only.
  2. lpoptions affects only jobs submitted by the lp and lpr commands.

When using the CUPS web interface you are most likely seeing the system-wide defaults but possibly you are running lpoptions as another user and seeing something different.

Also if you are printing from applications which interact with CUPS directly and don’t invoke lp or lpr you won’t necessarily be using options set by lpoptions.

Neil Darlow

Hi Neil,

Thanks for your responce.

No, you are right. I didn’t know of the system/user distinction. Thank you. However…

  1. I am not (yet) using lpoptions to SET values. I am only reading them. And the resultant behavior of the printer (for all users) is in acord with the options reported by lpoptions. In that, when I run lp -d myPrinter plainTextFile, the printer requests media from Tray1 as reported by lpoptions and not Tray2 as reported by CUPS?

  2. Also, from applications (oooWriter/Kwrite), the print dialogs report the same settings at the lpoptions and not the CUP/YaST setting?

So, I geuss that it is the GUI utilites that are at fault? But two of them? I’m puzzled!

Regards, Martin

Hi Martin,

I have never configured my printer using lpoptions (so I do not have an /etc/cups/lpoptions file) and lpoptions -p lp -l agrees with the settings I configured in YaST2 for my printer lp.

I wonder if it is the case that you have /etc/cups/lpoptions which the GUI tools are unaware of but CUPS is respecting?

Neil Darlow

Hi again Neil,

Thats the clue!! Thanks. I do (did) have an /etc/cups/lpoptions FILE! Don’t know how - but there is a lot I don’t know. And in it was all the (false) info.
So I renamed it. Re-ran lpoptions, and the conflict is resolved. YaHoooo…

Best regards, Martin

Back again!

Prior to resolving my problem, with your help Neil, I had been trying to understand the communication between the utilities and the printer.

In the CUPS web GUI, on the Printers | selected printer | Admin | Set Default Options tab, there is a button called “Query Printer for Default Options”. This button (I am assuming) parses my .ppd file looking for query strings (beginning with “?”). Using these Postscript commands, asks the printer to tell it (the CUPS server) what the current defaults in the printer are.

My results leave me wondering if I have another problem? The output from my network analyzer (Wireshark) suggest that I do…

userdict dup(\004)cvn{}put (\004\004)cvn{}put

% InstalledMemory
 currentsystemparams /InstalledRam get
 16#100000 div round cvi
 dup 256 lt {pop 256} if
 dup 1024 gt {pop 1024} if
 4 string cvs print (Meg) 
 = flush

  currentpagedevice /PageSize get aload pop 
  2 copy gt {exch} if (Unknown)
  [612 792] (Letter)
  [612 1008] (Legal)
  [522 756] (Executive)
  [216 360] (IndexCard)
  [396 612] (Statement)
  [612 936] (FanFoldGermanLegal)
  [432 648] (Env6x9)
  [297 684] (Env10)
  [279 540] (EnvMonarch)
  [378 522] (EnvA7)
  [315 414] (Env5Half)
  [261 468] (EnvPersonal)
  [252 468] (Cheque)
  [595 842] (A4)
  [420 595] (A5)
  [297 420] (A6)
  [499 709] (ISOB5)
  [516 729] (B5)
  [312 624] (EnvDL)
  [459 649] (EnvC5)
  [340 666] (EnvChou3)
  [255 581] (EnvChou4)
  { exch aload pop 4 index sub abs 5 le exch 5 index sub abs 5 le and 
      { exch pop exit } { pop } ifelse
  } bind forall = flush pop pop**A4**

 (Normal) (ProofPrint) (SavedPrint) (SecurePrint) (Unknown)]
 /RRCustomProcs /ProcSet findresource /currentjobtype get exec 
 exch pop get = flush

 product (Phaser 8560) search {pop pop}{pop (Unknown)} ifelse
 = flush

 (%disk0%) /IODevice resourcestatus
 {(True)}{(False)} ifelse 
 = flush

 currentpagedevice /InputAttributes get /Priority get length 3 sub dup 0 lt {
   pop (None)
   dup 2 ge {
     pop (Unknown)
     ] exch get
   } ifelse
 } ifelse
 = flush
**%% Error: stackunderflow; OffendingCommand: get ]%%
%% Flushing: rest of job (to end-of-file) will be ignored ]%%**

The red text (my highlighting) is the response from the printer to the CUPS server.

Any thoughts…?

Regards, Martin

Hi Martin,

It is, obviously, an error in the executed Postscript. It might be worth Google’ing for that response in relation to your printer or PPD.

If it occurs only in relation to querying the printer for the default settings, and print jobs are working ok, I would configure the printer explicitly and let that little mystery go.

Neil Darlow

Hi Neil,

Yep. I can live with that. Thank you, for all your help and advice.
Greatly appreciated.

Regards, Martin