Ticket #665 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

lpr/lpq/lp do not detect default printer

Reported by: kchen Owned by:
Priority: normal Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description (last modified by geofft) (diff)

kchen@moltres:~$ lpr

No default printer configured. Specify a -P option, or configure a
default printer via e.g. System | Administration | Printing.

When I go to System->Administration->Printing, I find that I have a default printer set (with the green checkbox). I tried setting a different default printer and then setting it back to the original, which made no difference.

kchen@moltres:~$ dpkg -l debathena*print*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version                        Description
+++-==============================-==============================-============================================================================
ii  debathena-printing-config      1.21~ubuntu10.04               Printing configuration for Debathena

My default printer is a "local" networked printer, but I also tried setting an MIT printer as the default, and also got the same error message as above.

Printing by selecting a printer from an application or running lpq -Pprinter works fine.

Change History

comment:1 follow-up: ↓ 3 Changed 14 years ago by jdreed

Evan notes:

debathena/printing/common.py:144 has a typo. Should be
cupsd.getDefault() instead of cups.getDefault()

comment:2 Changed 14 years ago by jdreed

Evan also notes:

Be sure to add a test when you fix it

comment:3 in reply to: ↑ 1 Changed 14 years ago by geofft

  • Status changed from new to proposed
  • Description modified (diff)

Replying to jdreed:

Evan notes:

debathena/printing/common.py:144 has a typo. Should be
cupsd.getDefault() instead of cups.getDefault()

Fixed in r24815 and uploaded to -proposed.

Replying to jdreed:

Evan also notes:

Be sure to add a test when you fix it

Discussed this with Evan and decided that unit-testing this particular function is hard and also meaningless. See ticket #671 for a proposal to add integration tests.

comment:4 Changed 14 years ago by jdreed

  • Status changed from proposed to closed
  • Resolution set to fixed

comment:5 Changed 14 years ago by kchen

  • Status changed from closed to reopened
  • Resolution fixed deleted

The fix is insufficient to fix the bug. I took a look at the code, and in _setup(), cupsd should also be added to the "global" line.

comment:6 Changed 14 years ago by jdreed

  • Status changed from reopened to committed

Fixed in r24851/r24852. Not building until Friday.

comment:7 Changed 14 years ago by jdreed

  • Status changed from committed to closed
  • Resolution set to fixed

This, uh, got fixed when we released 1.23.2 back in September. So "yay".

Note: See TracTickets for help on using tickets.