Description
I am using Ubuntu Eoan with CUPS 2.2.12, cups-browsed not running, cpdb-libs 1.2.0, cpdb-backend-cups 1.1.0.
Uauslly I have activated printer sharing:
$ cupsctl --share-printers
$ sudo systemctl restart cups
$ cupsctl
_debug_logging=1
_remote_admin=0
_remote_any=0
_share_printers=1
_user_cancel_any=1
[...]
$ sudo head -10 /etc/cups/cupsd.conf
LogLevel debug
PageLogFormat
MaxLogSize 0
# Allow remote access
Port 631
Listen /run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
$
With this configuration the CUPS backend is working as expected.
Now I turn off printer sharing on the local CUPS:
$ cupsctl --no-share-printers
$ sudo systemctl restart cups
$ cupsctl
_debug_logging=1
_remote_admin=0
_remote_any=0
_share_printers=0
_user_cancel_any=1
[...]
$ sudo head -10 /etc/cups/cupsd.conf
LogLevel debug
PageLogFormat
MaxLogSize 0
# Only listen for connections from the local machine.
Listen localhost:631
Listen /run/cups/cups.sock
# Disable printer sharing.
Browsing Off
DefaultAuthType Basic
WebInterface Yes
$
With this configuration the backend still lists my local CUPS queues but is not able to access the printers, as for example listing their options or sending a job.
For testing I have run the print_frontend
from the demo/
directory of the cpdb-libs source (on Ubuntu it is also in the libcpdb-libs-common-dev binary package. When starting print_frontend
I get my local CUPS queues listed immediately (all which lpstat -e
would list), but trying to access, with commands like get-all-options <queue> CUPS
or print-job ~/.bashrc <queue> CUPS
fails.
This should work, even the extreme case of cupsd.conf
having only Listen /run/cups/cups.sock
and no other Listen
or Port
lines.