# [solved] Cups + Avahi (Zeroconf): A frustrating experience

## Rexilion

Hi,

I have been trying to get this combination to work. My setup is the following:

- Ubuntu server with a HP PSC 2355p printer attached. Driver installed, local printer works fine. Cups version 1.6.2-1ubuntu5. Avahi-daemon 0.6.31.

- Gentoo client trying to connect to the Ubuntu server. Cups 1.6.2-r5, Cups-filters (cups-browsed) 1.0.34-r1 and hplip 3.12.10a installed.

I already filled a bug for a silent dependency and seem to slowly progress. But this is where I really get stuck. I compiled cups without ssl, so here is what happens now:

error_log:

CUPS-Add-Modify-Printer client-error-not-possible: Bad device-uri scheme "ipps".

Cups-browsed tries to add the printer to CUPS with the secured IPP protocol (why?). Ubuntu broadcasts three different types of services for the same printer:

+ wlp5s8 IPv4 HP PSC 2350 series @ Delta                    _ipps._tcp           local

+ wlp5s8 IPv4 HP PSC 2350 series @ Delta                    _printer._tcp        local

+ wlp5s8 IPv4 HP PSC 2350 series @ Delta                    _ipp._tcp            local

If I install cups with USE=ssl, it does not work either. The program feeds CUPS a link like this:

ipps://Delta.local:631/printers/HP_PSC_2350_series

Delta.local does not resolve. Does avahi need to do that??

What is going wrong? I'm using a barebone Gentoo installation with as few USE-flags as possible. What am I missing???

----------

## Rexilion

I managed to make cups display broadcasted printers ('Browsing On'). I attached the below screenshot, this does not look pretty (look at the location!).

Will try again later with SSL enabled:

http://postimg.org/image/t6jv2q8pp/

----------

## Rexilion

Ok, I managed to solve it. A few observations:

* I needed to emerge sys-auth/nss-mdns in order to resolve these 'weird' <hostname>.local hostnames. I always thought it was /etc/hosts and DNS, and that's it. More on this at number 2.

* nss-mdns requests you to manually modify /etc/nsswitch.conf . Every piece of software which needs to resolve's hostname's is affected by this file (gethostbyname()). I did not know that. But this is pretty nice to know actually.

* cups-browsed seems to prefer to use the ipps over ipp and 'printer' (whatever that is.. http?)

It works like a peach now. That is what matters.

----------

