Am I using CUPS or some other printing method?

Kurt Pfeifle kpfeifle at danka.de
Sun Mar 18 15:02:30 PDT 2007


> Kurt Pfeifle wrote:
> >> John Thompson wrote:
> >
> >> Where can I inform the system about my default printer dj500
> >> when I use lp or lpr?
> >
> >
> > The command
> >
> >   lpoptions -d number_15
> >
> > will set your printer named "number_15" as your default printer for the user you are currently (and that info will be stored in "~/.lpoptions"). If you run that command as root, you set that printer as the default one for all users (and that info will be stored in "/etc/cups/lpoptions")..
> >
> > See also "man lpoptions".
> > _______________________________________________
>
> Thanks very much for your info on lpoptions John.
> I've viewed the man page.
>
> Actually, I have a ~/.lpoptions which contains:
>
> lba at kinda ~ $ cat .lpoptions.orig
> Dest dj500 _kde-filters
> Special Advanced%20Faxing%20Tool%20(ksendfax)
> Special Mail%20PDF%20File
> Special Print%20to%20File%20(PDF)
> Special Print%20to%20File%20(PostScript)
> Special Send%20to%20Fax

KDEPrint kinda abuses the ~/.lpoption files to store the settings of its own "Special" printers there as well. But since it uses its own "Special" prefix word to each line, this does not disturb CUPS.

> Whenever I issue your command as user
> lpoptions -d dj500

I don't claim ownership of that command  :-)

> my actual ~/.djoptions disappears!  Like erased.

CUPS does not know about KDE's "abuse" of that file, and does not preserve what KDE had written in there.

> Luckily I always make a .orig whenever editing system files.
>
> Whatever could be causing that erasure?
> Apparently, my original ~/lpoptions file above was not enough to cause
> the printer to do it.
> Is my current ~/.lpoptions file correct and sufficient?
>
> Running lpoptions -d dj500 as root produced a new file
> /etc/cups/lpoptions with the single line:
> Default dj500 _kde-filters=true

That part "_kde-filters=true" will cause problems. (I don't know how this came into that file, probably by CUPS' lpoption command mis-interpreting some previous _kde-filters entry.) You'll see that if you...

 * run "kprinter -d dj500",
 * click "Properties",
 * and open the right-most tab "Filters",

that there be a lonely "true" filter in the list (which does not exist for real).

Remove that. Either...

 * use an editor of your choice
 * click on the "Remove filter" (white-red "X") icon in kprinter

> With the one liner in place, lp file works but I wonder
> 1.  Why didn't my ~/.djoptions file work and

There is no .djoptions file I know of.

> 2.  Should I edit /etc/cups/djoptions

Same for /etc/cups/djoptions

> to include the stuff in ~/.djoptions?

If you meant *lp*options, then your previous file did not hold any relevant settings. You'll notice settings appearing there if you choose one of the special printers in the KDE print dialog, click "Properties", change some settings away from the defaults, and click "Save".

However, make sure this "_kde-filters=true" is deleted from /etc/cups/lpoptions. It will prevent KDE's print dialog to work for the dj500 printer (and every other printer that has this parameter).





More information about the cups mailing list