[cups] make browsed printers available on workstation commandline

Jörg Thümmler listen at vordruckleitverlag.de
Mon Aug 2 03:30:41 PDT 2021


Am 01.08.21 um 16:34 schrieb Klaus Vink Slott:
> Hi
> 
> I am currently working in a lab environment trying to understand
> autoconfigure before implementing this in production.
> 
> The lab has 3 vlans; print - server - worklab. Printer is a Samsung
> CLP-680ND, and server and workstations is running openSUSE 15.2 with
> cups-2.2.7
> 
> I have successfully setup the server to print, although using the
> generic driver I was unable to access some of the printers capabilities,
> like duplex. I therefore switched to use the ppd file from Samsung and
> everything bow seems to work from the server.
> 
> On the server I can print from Firefox, KDE apps, and the commandline
> whitout problems. I have kept cups-browsed disabled here, to avoid
> double printer registration:
> 
> klaus at raagi:~> lpstat -a
> a4laser accepting requests since søn 01 aug 2021 15:07:12 CEST
> klaus at raagi:~> lpr -P a4laser -o sides=two-sided-long-edge long.txt
> 
> produces a double sided printout as I would wish/expect :-)
> 
> -----------------
> The goal is to share this printer via the server.
> 
> So I configured avahi on the server, allowed it trough firewall, added
> avahi repeater between server lan on worklab lan on the firewall, and
> enabled ipp-client on the workstation.
> 
> I can now see avahi picks up the printer on the workstation:
> klaus at ituska:~> avahi-browse -rt _ipp._tcp
> +  wlan0 IPv4 Samsung CLP-680ND @ raagi                     Internet
> Printer     local
> =  wlan0 IPv4 Samsung CLP-680ND @ raagi                     Internet
> Printer     local
>     hostname = [raagi.local]
>     address = [172.16.191.8]
>     port = [631]
>     txt = ["printer-type=0x80105E" "printer-state=4" "Copies=T"
> "Duplex=T" "Color=T" "TLS=1.2"
> "UUID=83cfee6a-2882-32f6-7771-e157d42a8110"
> "pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster"
> "product=(Samsung CLP-680 Series)" "priority=0" "note=Hobbystue"
> "adminurl=https://raagi.local.:631/printers/a4laser" "ty=Samsung CLP-680
> Series PS" "rp=printers/a4laser" "qtotal=1" "txtvers=1"]
> 
> Firefox and Thunderbird also happily picks up the printer, shows status
> and is capable of double sided printout as well.
> 
> But I am unable to access the printer from the commandline and KDE Apps:
> 
> klaus at ituska:~> lpstat -a
> lpstat: No destinations added.
> 
> Searching for this problem I have seen various howto's using lpadmin to
> configuring the printer
> 
> sudo lpadmin -p a4laser -v
> dnssd://Samsung%20CLP-680ND%20%40%20raagi._ipp._tcp.local/cups?uuid=83....very
> long uuid here
> 
> but that seems manual, labor intensive and error prone to me. Is it not
> possible to have command line printing autoconfigured?
> 
> In cups/error_log I see:
> E [01/Aug/2021:13:05:11 +0200] [Client 10016] Returning IPP
> client-error-bad-request for Create-Printer-Subscriptions (/) from localhost
> 
> Does this indicate that cups-browsed is missing some permission to
> create the printer it found?
> 

Hi,

i would give this a try.

first i would check, what http(s)://localhost:631 (on the client side) 
shows and put "browsing" on if it's off.

Then look into cupsd.conf's <limit> sections for sufficent rights...

-- 
cu

jth


More information about the cups mailing list