[cups.bugs] [HIGH] STR #1970: lpoptions unable to set a basic printer setting
Kurt Pfeifle
kpfeifle at danka.de
Fri Sep 8 17:50:19 PDT 2006
Kurt Pfeifle <kpfeifle at danka.de> wrote (Saturday 09 September 2006 02:35):
> Ryan Lovett <bugs at spacecoaster.org> wrote (Friday 08 September 2006 23:39):
>
>> [STR New]
>
> Please ask for help in the "General" forum first -- this is not a bug
> report.
>
>> I'm trying set the default behavior of a spool to be duplex. If I run
>>
>> # lpoptions -d pr1 -l
>>
>> I see, among other things,
>>
>> Duplex/2-Sided Printing: *None DuplexNoTumble DuplexTumble
>
> In occurrences of "a/b c d: e f *g h i":
>
> "a" - is the (internally used) option name used by the
> system, and required on the commandline;
> "b c d" - is the (user visible) "translated" option
> (displayed by GUI print dialogs, like KDE's
> 'kprinter', or 'xpp' or 'gtklp'
> e, f, g, h, i - selectable values for the options; the one
> currently used default one is denoted with an
> asterisk ('*').
>
>> I tried:
>>
>> # lpoptions -o Duplex/2-Sided\ Printing=DuplexNoTumble
>
> That's not quite right. Try
>
> lpoptions -p pr1 -o Duplex=DuplexNoTumble
>
> to set your impersonated user's default options into $HOME/.lpoptions
> for printer "pr1". Use (as root!).
>
> lpadmin -p pr1 -o Duplex=DuplexNoTumble
Rats! Stupid typo. That should have been:
lpoptions -p pr1 -o Duplex=DuplexNoTumble
You can also use (as root!)
lpadmin -p pr1 -o Duplex=DuplexNoTumble
which sets the option inside the PPD (that is in /etc/cups/ppd/pr1.ppd),
and hence, for all client print job as well that originate from remote
computers who browsed the local printer.
> to set systemwide defaults for printer "pr1" into /etc/cups/lpoptions.
> Use
>
> lpr -p pr1 -o Duplex=DuplexTumble /path/to/printfile
> lp -d pr1 -o Duplex=DuplexTumble /path/to/printfile
>
> to print a job with a Duplex setting that deviates from the default
> option setup. "lp -o something" overrides any other settings which
> may or may not be stored in $HOME/.lpoptions or /etc/cups/lpoptions.
> A user's $HOME/.lpoptions setting overrides the systemwide default in
> /etc/cups/lpoptions.
>
> Cheers,
> Kurt
So, for completeness, here again the full version:
---------------------------------------------------------------------
A commandline of
lpoptions -p printername -l
will result in lines build along the scheme
"a/b c d: e f *g h i"
where:
"a" - is the (internally used) option name used by the
system, and required on the commandline;
"b c d" - is the (user visible) "translated" option
(displayed by GUI print dialogs, like KDE's
'kprinter', or 'xpp' or 'gtklp'
e, f, g, h, i - selectable values for the options; the one
currently used default one is denoted with an
asterisk ('*').
Based on that info, you may get from this command
lpoptions -d pr1 -l
a line like:
Duplex/2-Sided Printing: *None DuplexNoTumble DuplexTumble
Now you can use
lpoptions -p pr1 -o Duplex=DuplexNoTumble
to set your impersonated user's default options into $HOME/.lpoptions
for printer "pr1". Use (as root!).
lpoptions -p pr1 -o Duplex=DuplexNoTumble
to set systemwide defaults for printer "pr1" into /etc/cups/lpoptions.
Use (as root!).
lpadmin -p pr1 -o Duplex=DuplexNoTumble
to set defaults for PPD file used by printer "pr1" (that is, the file
located at /etc/cups/ppd/pr1.ppd). This will be used by remote clients
who picked up the local printer via browsing or polling.
Use
lpr -p pr1 -o Duplex=DuplexTumble /path/to/printfile
lp -d pr1 -o Duplex=DuplexTumble /path/to/printfile
to print a job with a Duplex setting that deviates from the default
option setup.
* "lp -o something" overrides any other settings which may or may
not be stored in $HOME/.lpoptions or /etc/cups/lpoptions or in
/etc/cups/ppd/pr1.ppd
* A user's $HOME/.lpoptions setting overrides the systemwide default
in /etc/cups/lpoptions or in /etc/cups/ppd/pr1.ppd
* A setting in the PPD file /etc/cups/ppd/pr1.ppd will be used if
not specified otherwise.
Cheers,
Kurt
More information about the cups-devel
mailing list