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

Command line tool to execute cupsEnumDests() needed #5005

Closed
tillkamppeter opened this issue May 23, 2017 · 4 comments
Closed

Command line tool to execute cupsEnumDests() needed #5005

tillkamppeter opened this issue May 23, 2017 · 4 comments
Assignees

Comments

@tillkamppeter
Copy link

cupsEnumDests() is the recommended function to list the available printers in a print dialog, as it does not only list the queues set up with the local CUPS daemon but also available network printers advertised by DNS-SD, like IPP network printers and remote CUPS queues.
If you want to print from the command line, the "lpstat" command only shows the queues of the local CUPS daemon and no DNS-SD-advertised remote printers, whereas the "lp" and "lpr" commands allow printing on such remote printers, with CUPS auto-creating a temporary print queue. So command line users cannot find out which printers are available.
My suggestion is to add an extra command line option to "lpstat" which makes the network printers being included in the output of "lpstat" (the full output of cupsEnumDests()).

@michaelrsweet michaelrsweet self-assigned this May 25, 2017
@michaelrsweet michaelrsweet added this to the 2.2 milestone May 25, 2017
@michaelrsweet
Copy link
Collaborator

[master 4b17d76] Add support for "-e" option in lpstat (Issue #5005)

@tillkamppeter
Copy link
Author

This is principally working, but after having done an operation which triggers the creation of a temporary queue, the name of the queue is shown twice, once because it is one of the current CUPS queues and once because it is an available network printer. The output needs to get filtered for duplicates.

@michaelrsweet
Copy link
Collaborator

[master 9022d60] Rework lpstat -e to use cupsGetDests to eliminate duplicates (Issue #5005)

@tillkamppeter
Copy link
Author

Now it is working perfectly. Thanks.

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