getenv LPDEST or PRINTER for LPR

Kurt Pfeifle kurt.pfeifle at infotec.com
Thu Jun 14 08:19:37 PDT 2007


> Can someone tell me why LPR is not reading the LPDEST or PRINTER environment variable? I looked at the lpr.c code but since I'm not a programmer I really couldn't follow it that well. The best I could tell is that cupsGestDest is assigning a printer name which is making it skip the getenv("LPDEST") or getenv("PRINTER"). Any help would be great.
>
> Actually if there is another solution that would help too. I'm trying to set a default printer per user and not the system printer. So when the user issues a lpr command it would either get the LPDEST or some other setting a print to the correct printer.


A user can set his own, personal default printer with the command

  lpoptions -d printername

See also "man lpoptions".





More information about the cups mailing list