* 2023-02-16 10:41:33-0500, Greg Wooledge wrote:

> 1) Someone suggested: avahi-discover -r _print-caps._tcp
>    When I tried it last year, it simply hung with no visible output
>    until Ctrl-C'ed.

Here is my version which I suggest turning into a shell alias, function
or script:

    avahi-browse -atrp 2>/dev/null | awk -F\; \
        '$1 == "=" { printf "%-23s %-26s %5s %s\n",$7,$8,$9,$5 }'

It should print lines like these:

    SEC00159939FFD2.local   192.168.0.11                 631 Internet Printer
    mithlond.local          192.168.0.2                  631 Internet Printer

The SEC00159939FFD2.local is my printer. The printer gets its IP through
DHCP but I don't use the IP address anywhere, because the .local name
works automatically. Make sure to install (almost) all packages which
CUPS and Avahi recommend.

> Is there any way I can tell CUPS "Please set up a queue for a printer
> whose IP address is 10.76.172.100 even though you can't discover it with
> your fancy tools"?

I would try to add manually one of these connection addresses:

    http://10.76.172.100:631
    ipp://10.76.172.100:631

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462

Attachment: signature.asc
Description: PGP signature

Reply via email to