Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cupsGetDests can not retrieve the default printer name from file ~/.cups/lpoptions under some case #5684

Closed
tangyanli opened this issue Nov 15, 2019 · 2 comments
Assignees

Comments

@tangyanli
Copy link

The #5683 is closed, so I create this new issue.
I have tested the newest branch master & 2.2.x. The test result is as below:

If the default printer name in the file /etc/cups/printers.conf is empty, then the phenomenon described in the #5683 has been fixed.

But if the default printer name in the file /etc/cups/printers.conf is not empty, then the phenomenon described in the #5683 is still existent.

@tangyanli tangyanli changed the title cupsGetDests can not retrieve the default printer name from file ~/.cups/lpoptions cupsGetDests can not retrieve the default printer name from file ~/.cups/lpoptions under some case Nov 15, 2019
@michaelrsweet michaelrsweet self-assigned this Nov 18, 2019
@michaelrsweet michaelrsweet added this to the CUPS 2.2.x Updates milestone Nov 18, 2019
@michaelrsweet
Copy link
Collaborator

Investigating; the order should be: environment variables (LPDEST and PRINTER) or location-based default (macOS), lpoptions default, then server default.

@michaelrsweet
Copy link
Collaborator

OK, I've reworked the defaults code a bit to make sure the order of precedence is honored. Note that on macOS the default printer is usually "last used printer" so we'll never use the lpoptions default at all (and it will get switched to the last used printer when you update the saved settings).

[master 34b446d86] Refactor the defaults code so that the correct order of precedence is respected in all cases (Issue #5683)

[branch-2.2 457d534] Refactor the defaults code so that the correct order of precedence is respected in all cases (Issue #5683)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants