Bug#877888: cups-bsd: lpq and lp ignore the PRINTER environment variable
Package: cups-bsd
Version: 2.2.4-7
Severity: normal
File: /usr/bin/lpq
lpq and lp are no longer paying attention to the PRINTER environment
variable. (The cups(1) manpage says that PRINTER is used except for
setuid binaries. But lpq and lp are not setuid.)
Here is a commented log with lpq:
$ lpq
lj400 is ready /* my default destination */
no entries
$ PRINTER=mh371 printenv PRINTER
mh371 /* to show that the environment variable inherits */
$ PRINTER=mh371 lpq
lj400 is ready /* but lpq ignores it */
no entries
$ lpq -Pmh371
mh371 is ready /* to show that mh371 is a known destination */
no entries
And for lp:
$ PRINTER=mh371 lp /usr/share/hplip/data/ps/testpage.ps.gz
request id is lj400-2890 (1 file(s))
It went to the default destination despite the environment setting.
Here is my /etc/cups/lpoptions:
Default lj400 fitplot=true PageSize=Letter sides=two-sided-long-edge
Dest lj400/gs fitplot=true PageSize=Letter pdftops-renderer=gs sides=two-sided-long-edge
Dest mh235 fitplot=true PageSize=Letter sides=two-sided-long-edge
Dest mh271 fitplot=true PageSize=Letter sides=two-sided-long-edge
Dest mh271/duplex fitplot=true PageSize=Letter sides=two-sided-long-edge
Dest mh271/saver fitplot=true number-up=2 PageSize=Letter sides=two-sided-long-edge
Dest mh371 PageSize=Letter sides=two-sided-long-edge
Dest mitx duplex=duplexnotumble
Dest psc outputorder=reverse PageSize=Letter PrintoutMode=High
-Sanjoy
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages cups-bsd depends on:
ii cups-client 2.2.4-7
ii cups-common 2.2.4-7
ii debconf 1.5.63
ii libc6 2.24-17
ii libcups2 2.2.4-7
cups-bsd recommends no packages.
Versions of packages cups-bsd suggests:
ii cups 2.2.4-7
ii update-inetd 4.44
-- debconf information:
cups-bsd/setuplpd: false
--
Reply to: