mdnsd AirPrint

Status
Not open for further replies.

kai80

Cadet
Joined
Aug 26, 2014
Messages
5
I switched from Ubuntu Linux to freeNAS on my home server. On my old setup I configured cups to announce AirPrint using Avahi. That worked fine as all my iOS devices found the announced printer.

Now with freeNAS (latest version) I created a jail, installed cups and configured it according to http://superuser.com/questions/673880/airprint-and-airplay-on-freenas.

However, the latest freeNAS does no longer use Avahi, but mdns. Therefore the generated AirPrint Avahi service isn't used. My Mac finds the printer using Bonjour (mdnsd is started within the jail), but iOS doesn't. So my question is: How can I configure mdnsd to announce my printer as AirPrint compatible?
 

Middling

Dabbler
Joined
Mar 3, 2012
Messages
40
You can use Avahi from inside the jail.

IIRC by default it comes with dbus enabled so you need to switch if off in (your jails's) /usr/local/etc/avahi/avahi-daemon.conf

Search for a line

Code:
[server]
enable-dbus=yes


and switch it to "no" (or add that line if it's not present).

Then edit your jail's /etc/rc.conf and add
Code:
avahi_daemon_enable="YES"


Restart Avahi with
Code:
service avahi-daemon restart


and you should be good to go.

I don't have any iOS devices but have previously checked my CUPS jail is working in my brother's iPhone.
 

kai80

Cadet
Joined
Aug 26, 2014
Messages
5
You can use Avahi from inside the jail.

IIRC by default it comes with dbus enabled so you need to switch if off in (your jails's) /usr/local/etc/avahi/avahi-daemon.conf

Search for a line

Code:
[server]
enable-dbus=yes


and switch it to "no" (or add that line if it's not present).

Then edit your jail's /etc/rc.conf and add
Code:
avahi_daemon_enable="YES"


Restart Avahi with
Code:
service avahi-daemon restart


and you should be good to go.

I don't have any iOS devices but have previously checked my CUPS jail is working in my brother's iPhone.

Thanks for your answer! When I try to install Avahi, pkg wants to uninstall cups (guess mDNSResponder is a dependency of cups?):

Code:
# pkg install avahi
Updating repository catalogue
FreeBSD repository is up-to-date
All repositories are up-to-date
Checking integrity... done (1 conflicting)
Checking integrity... done (0 conflicting)
The following 10 packages will be affected (of 0 checked):

Installed packages to be REMOVED:
    cups-base-1.7.3_1
    cups-1.7.3
    mDNSResponder-544_2

New packages to be INSTALLED:
    avahi: 0.6.31
    avahi-libdns: 0.6.31_1
    avahi-gtk: 0.6.31_2
    avahi-header: 0.6.31
    libglade2: 2.6.4_7
    xmlcatmgr: 2.2
    avahi-autoipd: 0.6.31

The operation will free 13 MB

Proceed with this action [y/N]:


I'm new to freeBSD. How can I install both, Avahi and cups?
 

Middling

Dabbler
Joined
Mar 3, 2012
Messages
40
It's been several months since i did this but i don't think i used pkg. I'm fairly sure i built CUPS using the ports system and i think i did a "make config" prior to building and switched it back to using Avahi.
 

kai80

Cadet
Joined
Aug 26, 2014
Messages
5
It's been several months since i did this but i don't think i used pkg. I'm fairly sure i built CUPS using the ports system and i think i did a "make config" prior to building and switched it back to using Avahi.
Yes, that fixed it. Thanks a lot!
 
Status
Not open for further replies.
Top