Hi,
i fell into the same trap and i'd say please provide a wrapper
like a2ps does - No need to configure this kind of issues
as its perfectly detectable - 99% of the users have a single printer
and will be happy - The others set a cups default printer and we be
happy too - so only a tiny percentage of the users will need to touch
the config at all.

f...@touch:~$ cat /usr/bin/a2ps-lpr-wrapper 
#!/bin/bash
#
# a2ps-lpr-wrapper - lp/lpr wrapper script for GNU a2ps on Debian
#
 
TEMP=`getopt -o d: -n 'a2ps-lpr-wrapper' -- "$@"`
a2ps_printer=""

if [ $? != 0 ]; then echo "Terminating..." >&2; exit 1; fi

# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"

while true ; do
  case "$1" in
    -d) a2ps_printer=$2; shift 2 ;;
    --) shift; break ;;
     *) echo "usage: a2ps-lpr-wrapper -d [printer] [files]"; exit 1 ;;
  esac
done

# If /usr/bin/lp (from cupsys-client) exists, just use it.
if [ -x /usr/bin/lp ]; then
  if [ "x$a2ps_printer" != "x" ]; then d="-d $a2ps_printer"; else d=""; fi
  /usr/bin/lp $d "$@"
elif [ -x /usr/bin/lpr ]; then
  # In case /usr/bin/lp is not available, then fall back /usr/bin/lpr.
  if [ "x$a2ps_printer" != "x" ]; then P="-P $a2ps_printer"; else P=""; fi
  /usr/bin/lpr $P "$@"
elif [ -x /usr/bin/rlpr ]; then
  # In case /usr/bin/lpr is not available, then fall back /usr/bin/rlpr.
  if [ "x$a2ps_printer" != "x" ]; then P="-P $a2ps_printer"; else P=""; fi
  /usr/bin/rlpr $P "$@"
else
  # If any of lp, lpr and rlpr is not available, then fail
  echo "$0: lp/lpr/rlpr missing!"
  exit 1
fi

Thanks 

Flo
-- 
Florian Lohoff                  [email protected]             +49-171-2280134
        Those who would give up a little freedom to get a little 
          security shall soon have neither - Benjamin Franklin

Attachment: signature.asc
Description: Digital signature

Reply via email to