Printing with -P options fails with lp backend
Bug #1531 reported by
John Eckersberg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
a2ps (Ubuntu) |
Fix Released
|
Medium
|
MOTU |
Bug Description
If lp is installed, a2ps-lpr-wrapper will use it; otherwise it falls back to lpr. However, the #{lp} variable defineds the printer specifier as -P. lp does not take -P; it takes -d.
The specifier needs to differ depending on which backend is being used; -d for lp or -P for lpr.
Changed in a2ps: | |
assignee: | nobody → motu |
To post a comment you must log in.
This bug is fixed in dapper but not in breezy.
This bug renders a2ps unusable because lp
is installed by default.
a2ps-lpr-wrapper from dapper can't be simply
copied to breezy because breezy's default setting
uses -P but dapper's -d Here a fix that works with
lpr and lp.
--- /usr/bin/ a2ps-lpr- wrapper. orig-breezy- 4.13b-4. 3 2005-04-14 19:09:01.000000000 +0200 a2ps-lpr- wrapper 2006-01-27 15:53:56.000000000 +0100
+++ /usr/bin/
@@ -5,8 +5,10 @@
# If /usr/bin/lp (from cupsys-client) exists, just use it.
if [ -x /usr/bin/lp ]; then
- /usr/bin/lp $*
+ shift
+ /usr/bin/lp -d $*
else
# In case /usr/bin/lp is not available, then fall back /usr/bin/lpr.
- /usr/bin/lpr $*
+ shift
+ /usr/bin/lpr -P $*
fi
As the fix version in dapper my patch relies on the fact that
-d or -P is the first argument. But my version will not complain
after a breezy -> dapper update with an unchanged
a2ps config that still passes -P instead of -d.
Achim